I think you have to set the default cookie policy. HttpClient does all
cookie handling automatically - depending on the policy of course.
There's helpful examples on the website of the Apache httpClient
project.
On Nov 10, 6:37 pm, Michael <[EMAIL PROTECTED]> wrote:
> Looking at my own code that does exactly this, I notice that I run
> client.getCookieStore().getCookies() *before* I make the login request
> (via HTTP POST). Perhaps you need to initialize the cookie store
> first?
>
> Otherwise, I'm doing pretty much as you're doing:
>
> DefaultHttpClient client = new DefaultHttpClient();
> List<Cookie> cookies = client.getCookieStore().getCookies();
>
> HttpPost request = new HttpPost(new URI(myUrl));
> // add stuff to the request, whatever's needed
>
> HttpResponse response = client.execute(request);
> // test the response here
>
> if (cookies.isEmpty()) {
> // didn't get cookies
>
> }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---