commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rodney Waldhoff" <rw...@hotmail.com>
Subject RE: Questions on HttpClient - Proxy Setting
Date Mon, 12 Nov 2001 16:33:41 GMT
Hi Sven, sorry it took so long to get back to you, I've been swamped.

Currently, HTTP Client doesn't pay any attention to the proxySet, proxyHost 
and proxyPort system properties.

You can change the proxy configuration at any time as follows:

HttpClient client;
HttpMethod method1;
HttpMethod method2;

client.startSession(host,port,proxyHost,proxyPort);
client.executeMethod(method1);
client.endSession();

client.startSession(host2,port2,proxyHost2,proxyPort2);
client.executeMethod(method1);
client.endSession();

or, using without using HttpClient itself:

HttpState state;
HttpMethod method1;
HttpMethod method2;

HttpConnection conn1 = new HttpConnection(host,port,
                                          proxyHost,proxyPort);
conn1.open();
method1.execute(state,conn1);
conn1.close();

HttpConnection conn2 = new HttpConnection(host2,port2,
                                          proxyHost2,proxyPort2);
conn2.open();
method2.execute(state,conn2);
conn2.close();

Hope that helps,
- Rod

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message