How to accept cookies when using a webservice - Android?

303 views Asked by At

I'm trying to send HTTP Post requests to my webservice. It seems to work, however the cookies are not enabled.

I tried to import android.webkit.CookieManager in my Application and then use this code :

CookieManager cookieManager = new CookieManager();
cookieManager.setAcceptCookie(true);

I get an error telling me that CookieManager cannot be instancied.

Is there a way to allow cookies when sending a POST request ?

Thanks for your help.

1

There are 1 answers

1
rahul.ramanujam On