You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Eugeny N Dzhurinsky <bo...@redwerk.com> on 2006/06/27 09:04:04 UTC

Managing cookies

Hi there!

I'm using HttpClient in my spider application. Some domains are setting
cookies at start pages and are checking that cookies on next pages (I don't
know why, it's just fact). Is it possible to remember cookies and use them in
HttpClient later with setting some properties of connector, or I need to do
this in my application.

-- 
Eugene N Dzhurinsky

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


Re: Managing cookies

Posted by Roland Weber <ht...@dubioso.net>.
Hello Eugeny,

> I'm using HttpClient in my spider application. Some domains are setting
> cookies at start pages and are checking that cookies on next pages (I don't
> know why, it's just fact).

It's called a session, and cookies are the preferred way to track them.
http://wiki.apache.org/jakarta-httpclient/ForAbsoluteBeginners#head-143a342e3c04ac990badbbe6cdd01bd922b29b4d

> Is it possible to remember cookies and use them in
> HttpClient later with setting some properties of connector, or I need to do
> this in my application.

It's done by default in HttpState objects. Each HttpClient object
has a default HttpState.

cheers,
  Roland


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