On Sun, 2010-01-24 at 18:38 -0800, dale77 wrote: > Hello, > > I have a situation where I want to avoid the proxy for the local intranet. > How do I do this with httpclient 4? > > Currently I'm using code like this: > > proxyClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy); > HttpGet httpget = new HttpGet(uri); > ResponseHandler<String> responseHandler = new BasicResponseHandler(); > String responseBody = proxyClient.execute(httpget, responseHandler); > > Thanks > > Dale >
Dale, You should provide a custom implementation of the HttpRoutePlanner interface http://hc.apache.org/httpcomponents-client/tutorial/html/connmgmt.html#d4e454 http://hc.apache.org/httpcomponents-client/httpclient/apidocs/org/apache/http/conn/routing/HttpRoutePlanner.html Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
