hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Becke <be...@u.washington.edu>
Subject Re: connect via proxy
Date Mon, 11 Aug 2003 20:59:26 GMT
Hi Quent,

Yes, proxy configuration must be manually set.  This can be done using  
something like:

	HttpClient client = new HttpClient();
	client.getHostConfiguration().setProxy("hostname", 123);
	GetMethod get = new GetMethod("http://somehost.com");
	client.executeMethod(get);

Please take a look at  
<http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/ 
commons/httpclient/HostConfiguration.html> for some more about  
HostConfiguration.

Mike

On Monday, August 11, 2003, at 01:24 PM, Querent wrote:

> Dear all,
>
> My program is using Get and Post method in HttpClient. The program  
> works if the internet connection is using dial up. But not if using  
> proxy.
> Do I have to set up proxy manually in the program ? (my proxy doesn't  
> need authentication)
> Can it just detect the connection from the browsers ?
>
> Thanks in advance.
>
> Quent
>
>
> ---------------------------------
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!


Mime
View raw message