Daniel Wu
Daniel Wu

Reputation: 6003

how to specify http or https proxy in clj-http in clojure

In this url, it shows how to use proxy in clj-http

https://github.com/dakrone/clj-http

(client/get "http://foo.com" {:proxy-host "127.0.0.1" :proxy-port 8118})

But since we could have http proxy or https proxy, how to specify http or https? or it's mart enough to pickup the right now without the need to give http or https?

Upvotes: 0

Views: 1127

Answers (1)

DanLebrero
DanLebrero

Reputation: 8593

You are using the per-request api, so you manually choose if the request has to use a proxy or not, so for that particular request it will always use a proxy no matter if it is http or https

Upvotes: 0

Related Questions