commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ludwig, Sven" <SLud...@CONET.DE>
Subject RE: Questions on HttpClient - Proxy Setting
Date Mon, 12 Nov 2001 17:05:51 GMT
Hello!

Rod, thank you very much.
That helps a lot.

But I am very interested how that works without
those system properties. It would be very nice
if someone could lose a few words about it, how
HttpClient manages Proxy-Setting internally.

greetings and thanks
Sven

> -----Original Message-----
> From: Rodney Waldhoff [mailto:rwald@hotmail.com]
> Sent: Monday, November 12, 2001 5:34 PM
> To: commons-dev@jakarta.apache.org
> Subject: RE: Questions on HttpClient - Proxy Setting
> 
> 
> 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

--
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