Although it's possible to do so on a method base, it makes sense to change
the default as well. I reported this bug before and it was marked invalid:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6627


-----Original Message-----
From: Waldhoff, Rodney [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 06, 2002 4:56 AM
To: '[EMAIL PROTECTED] '
Subject: RE: HttpClient development


> > 3. is there any way to set the User-Agent string for an httpclient?
> Nope, but this has come up before.  If there isn't 
> one already, add an enhancement request to the 
> Bugzilla database so we don't forget.

Actually, there is a way on a method-per-method basis.  Simply call

 method.setRequestHeader("User-Agent","my agent string");

before calling execute.  The BaseMethod impl will see the existing header,
and not try to create a new one.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to