Tutorial :Java DefaultHTTPClient automatically handle cookies



Question:

I have a piece of code using the DefaultHttpClient and it makes a post request to login to a website.

However subsequent requests appear to have forgotten the fact im signed in.

How do i turn on automatic cookie handling of the DefaultHttpClient I am using?

Cheers,

Andy


Solution:1

Make shure to use the same DefaultHttpClient for every request.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »