hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bashiro"<bash...@myway.com>
Subject Re: User-Agent
Date Mon, 17 Sep 2007 10:12:24 GMT


Thaks a lot for this.
I really appreciate this. The student group that
i am writing client for, demand that their group name
appear as user-agent.

Thanks

Bashiro

 --- On Mon 09/17, Madhur Kumar Tanwani < madhurtanwani@gmail.com > wrote:
From: Madhur Kumar Tanwani [mailto: madhurtanwani@gmail.com]
To: httpclient-user@jakarta.apache.org
Date: Mon, 17 Sep 2007 11:08:18 +0530
Subject: Re: User-Agent

This is what I use. This sets the user agent string for the client, and <br>hence I
need to do it for every method call :<br><br>HttpClientParams params = httpclient.getParams();<br>//
Make the user agent string configurable<br>params.setParameter("http.useragent", "Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.0");<br><br>HTH.<br><br>Henry
Chen wrote:<br>> GetMethod authget = new GetMethod(url);<br>> authget.setRequestHeader(new
Header(<br>> 			"User-Agent",<br>> 			"Mozilla/5.0 (Windows; U; Windows
NT 5.1; en_US;<br>> rv:1.8.1.4)Gecko/20070515 Firefox/2.0.0.4"));<br>><br>><br>>
-----Original Message-----<br>> From: Bashiro [mailto:bashiro@myway.com] <br>>
Sent: Friday, September 14, 2007 11:25 AM<br>> To: httpclient-user@jakarta.apache.org<br>>
Subject: User-Agent<br>><br>><br>><br>> Hello guys,<br>>
What is the code snip for editing the<br>> "User-Agent" header in httpClient.<br>><br>>
Thanks<br>> Bashiro<br>><br>><br>> 
_______________________________________________<br>> No banners. No pop-ups. No kidding.<br>>
Make My Way  your home on the Web - http://www.myway.com<br>><br>><br>><br>>
---------------------------------------------------------------------<br>> To unsubscribe,
e-mail: httpclient-user-unsubscribe@jakarta.apache.org<br>> For additional commands,
e-mail: httpclient-user-help@jakarta.apache.org<br>><br>><br>>
---------------------------------------------------------------------<br>> To unsubscribe,
e-mail: httpclient-user-unsubscribe@jakarta.apache.org<br>> For additional commands,
e-mail: httpclient-user-help@jakarta.apache.org<br>><br>><br>>
  <br><br><br>-- <br>Madhur Kumar Tanwani <http://madhurtanwani.googlepages.com><br>Gebo
<http://feeds.feedburner.com/%7Er/Gebo/%7E6/1><br><br>****************************************************************<br>*
Imagine if every Thursday your shoes exploded if you tied them the *usual way*.<br>This
happens to us all the time with 
*computers*, and nobody thinks of complaining. Johnson<br>****************************************************************<br><br><br>---------------------------------------------------------------------<br>To
unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org<br>For additional
commands, e-mail: httpclient-user-help@jakarta.apache.org<br><br>

_______________________________________________
No banners. No pop-ups. No kidding.
Make My Way  your home on the Web - http://www.myway.com



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


Mime
View raw message