Hi Mark,

You will want to add the cookies to the HttpClient's HttpState. Please take a look at the following for an example:

<http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/src/ examples/CookieDemoApp.java?rev=1.12&content-type=text/vnd.viewcvs- markup>

Oleg has also recently created a patch that will keep HttpClient from overwriting manually set Cookie/Authentication headers. This or something like it will eventually be applied to HEAD.

< http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24081>

Enjoy,

Mike

On Thursday, October 23, 2003, at 07:23 PM, Mark R. Diggory wrote:

I'm trying to start using the HttpClient (I've always been instantiating my own HttpConnections and Methods). I want to manually set a cookie to be sent in the HttpRequest I am making, I can build the cookie myself, setting the proper domain information. But its unclear to me what the proper way to add it to the request is now, setRequestHeader (The old method I was using) seems to get cleared out when I use HttpClient.execute(HttpMethod method) to execute the request.

any tips would be helpfull, thanks

--
Mark Diggory
Software Developer
Harvard MIT Data Center
http://www.hmdc.harvard.edu


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




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



Reply via email to