clj-http
clj-http copied to clipboard
system settings to configure authentication for proxy not working
Setting the "standard" system settings to pass in proxy username and proxy password doe not work.
So this does not work:
(System/setProperty "https.proxyHost" "my HOST")
(System/setProperty "https.proxyPort" "my Port")
(System/setProperty "https.proxyUser" "my USER")
(System/setProperty "https.proxyPassword" "my PASSWORD")
(client/get "https://google.de")
I get an 407 (access denied) from the proxy. This means the first two settings get used, while the last two do not get used.
The following does work:
(client/get "https://google.de" {:proxy-host "my HOST" :proxy-port my-port :proxy-user "my user" :proxy-pass "my password"})
I think this isn't supposed to work with java either. It seems to me that it's just a "convention" in java world to call such properties proxyUser and proxyPassword.
Some examples here:
- https://memorynotfound.com/configure-http-proxy-settings-java/
- https://blogs.oracle.com/wssfc/handling-proxy-server-authentication-requests-in-java
Maybe this is a new feature request rather than a bug?