3

Im using HttpClient to access a website. The 1st post request gives me status code 302 a url which I Should redirect. For this I would require to get the session Id from cookies.

I used the below code to iterate the cookies.

List<Cookie> cookies = httpclient.getCookieStore().getCookies();

I dont see a session Id here in cookie. How should I proceed further to handle this url and get the response I need.

Bhesh Gurung
  • 50,430
  • 22
  • 93
  • 142
Geek
  • 3,187
  • 15
  • 70
  • 115
  • Related: http://stackoverflow.com/questions/4166129/apache-httpclient-4-0-3-how-do-i-set-cookie-with-sessionid-for-post-request and http://stackoverflow.com/questions/6272575/how-to-handle-the-session-in-httpclient-4-1 – Bhesh Gurung Jan 10 '12 at 15:51

0 Answers0