Open behrica opened 10 years ago
I found a potential way to solve this. It requires:
{:keys [status headers body error] :as resp} (http/get url {:proxy-host HOST :proxy-port PORT :proxy-user PROXY-USER :proxy-pass PROXY-PASS})]
We needed to decide, how to pass in the proxy credentials into all methods.
I am not sure, if this would handle ALL proxy scenarios, but the large majority. In any case more complex proxy configurations are not present in clj-http neither by now (but they are present n the appache http client components it is based on). And this would match with the proxy configuration options the JDK provides (and therefore all Clojure network methods based on JDK methods)
I noticed that it does not work with a http proxy.
I investigated a bit, a it seems that httpkit does not support a proxy at all:
https://github.com/http-kit/http-kit/issues/75
and won´t do so in the near future.
This is for me a killer argument... All corporate environments use http proxies these days, so does mine. So any web services / REST client API should support it.