commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: [commons-httpclient] changing request's header
Date Thu, 06 Apr 2006 10:17:38 GMT
On Thu, 2006-04-06 at 05:24 -0400, Alex wrote:
> Hello,
> 
>  
> 
> I am trying to connect to a URL which gives me message (its source) "Your
> browser does not satisfy software requirements. Please contact Customer
> Support or use more widespread versions of browsers, such as Internet
> Explorer or Opera."
> 
>  
> 
> How can I set User-Agent or something so that site thinks I am using
> Internet Explorer or something. Is there a way to do it?
> 

HttpClient httpclient = new HttpClient();
httpclient.getParams().setParameter(
 HttpClientParams.USER_AGENT, 
 "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)");

HTH

Oleg

>  
> 
> Thanks
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message