Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid: Handle Cookie from HTTP Get-Request
    primarykey
    data
    text
    <p>I am working on an app which shall log in to a web site (via <a href="http://......?password=xyz" rel="nofollow">http://......?password=xyz</a>). I use DefaultHttpClient for this. Along with the GET response, the website sends a cookie, which I want to store for further POST requests.</p> <p>My problem is that <code>client.getCookieStore().getCookies()</code> always receives an empty list of cookies.</p> <p>If I open <a href="http://www.google.com" rel="nofollow">http://www.google.com</a> (insted of my intended website), I receive the cookies properly, but the website I am working with, seems to send the cookie in some other way (it's a MailMan mailing list moderating page)</p> <p>I can see the respective cookie in Firefox cookie manager, but not in Firebug network/cookie panel (why?). InternetExplorer HttpWatchProfessional however shows the cookie when recording the traffic....</p> <p>There is some small difference, I observed between the cookies www.google.com sent and my target website: In HttpWatchProfessional, those cookies from google are marked as "Direction: sent", while the cookie from my website are marked as "Direction: Received". (how can the google cookies be sent, while I cleared browser/cookie cache just before?)</p> <p>Can someone explain the difference to me?</p> <p>My code is the following:</p> <pre><code>DefaultHttpClient client = new DefaultHttpClient(); HttpGet httpGet = new HttpGet(url); HttpResponse execute = client.execute(httpGet); List&lt;Cookie&gt; cookies = client.getCookieStore().getCookies(); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload