dimanche 1 mars 2015

Proxy Authentication, httpclient 4.3, post httpclient construction



I am in the process of converting some code that use HttpClient 3 to HttpClient 4.3 and I am trying to deal with specifying a proxy on an existing HttpClient object, but because this is essentially immutable, once built, I am not sure how to specify the authentication for the proxy.


So far I have this code, but I am not sure whether there is a way to specify the authentication for the proxy server at this point:



RequestConfig config = RequestConfig.custom()
.setProxy(httpsProxyHost)
.build();

httpRequest.setConfig(config);



Aucun commentaire:

Enregistrer un commentaire