Closed zjor closed 1 year ago
People have asked for this before and unfortunately it is NOT possible because the proxy is part of the root client config and setting it per request would require each request to re-build the client which would destroy performance and cause a lot of thread flailing.
this is sort of complete in 3.14.0 you can try it, It takes a full "Proxy" object rather than the 4 params. I'm not convinced that it will actually pass the auth though, I'm pretty sure I tried that once upon a time and Apache wouldn't do it because the auth is only configurable on the full client and not per request, but give it a shot and let me know.
4.0.0-RC6 does not have this because the Java HttpClient doesn't have Proxy per request.
There is
Unirest.config().proxy(...)
method which allows adding an authenticated ProxyI need to be able to call
Unirest.post(...).proxy(...)...
and specify authenticated proxy per request, without setting the proxy for all requests in the whole app.Please add a method accepting either username/password or the whole
Proxy
object.