Is it possible to assign a proxy for each thread in Jakarta Common's HTTPClient?
-
19-09-2019 - |
Question
I want to have multiple threads, each using a different proxy for Jakarta Common's HTTPClient. Last time I check, it was only possible to set one global/static proxy for this API. Does anyone how to accomplish the prior stated goal?
Solution
I believe that the proxy is set on each httpclient instance. Therefore, it should be possible to define one httpclient instance per thread, each having their own proxy settings.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow