commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex <alexn...@optonline.net>
Subject RE: [commons-httpclient] changing request's header
Date Thu, 06 Apr 2006 10:26:02 GMT
Thanks Oleg, before I was using 
httpclient.getParams().setParameter(
 HttpClientParams.USER_AGENT, 
 "Mozilla/4.0") so it didn't work. Needed to put full user-agent

-----Original Message-----
From: Oleg Kalnichevski [mailto:olegk@apache.org] 
Sent: Thursday, April 06, 2006 6:18 AM
To: Jakarta Commons Users List
Subject: Re: [commons-httpclient] changing request's header

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


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