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

1.1k Views Asked by At

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?

1

There are 1 best solutions below

2
DanLebrero On

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