hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florent Georges <li...@fgeorges.org>
Subject Re: HTTP Client 4.0: proxy settings?
Date Thu, 19 Feb 2009 09:57:05 GMT

Oleg Kalnichevski wrote:

> If you want HttpClient to use proxy system properties, try out
> the route planner implementation based on java.net.ProxySelector

> DefaultHttpClient httpclient = new DefaultHttpClient();
> ProxySelectorRoutePlanner routePlanner = new
> ProxySelectorRoutePlanner(
>      httpclient.getConnectionManager().getSchemeRegistry(),
>      ProxySelector.getDefault());
> httpclient.setRoutePlanner(routePlanner);

  That works great.  Thanks to both of you!

  BTW, why such useful methods are not on the HttpClient interface, but rather on the AbstractHttpClient
class (not even in a second interface)?  Is there any rational for that choice?

  Thanks again, regards,

Florent Georges


To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org

View raw message