3

I need to make a web request to an external service (Twilio), with multiple values specified for the same parameter, e.g.

GET /some-url?status=1&status=2&status=3

How do I tell clj-http to encode the request like this?

Petrus Theron
  • 27,855
  • 36
  • 153
  • 287

1 Answers1

4

You can put multiple values for your :query-param value inside of sequential:

(client/get
  "http://yoursite.com/some-url"
  {:query-params {"status" [1 2 3]}
   :debug true})
Sam Estep
  • 12,974
  • 2
  • 37
  • 75
Piotrek Bzdyl
  • 12,965
  • 1
  • 31
  • 49