开发者

android http request ignore cookie

I am using DefaultHttpClient and want to prevent HttpClient from accepting and sending cookies. I tried something like this but 'CookiePolicy.IGNORE_COOKIE' is not available.

mHttpClient.getParams().setParameter(ClientPNames.CO开发者_如何转开发OKIE_POLICY, CookiePolicy.IGNORE_COOKIE);


You can't just make up your own int Constants lol,

always check the API: http://developer.android.com/reference/java/net/CookiePolicy.html

How about

CookiePolicy.ACCEPT_NONE

http://developer.android.com/reference/java/net/CookiePolicy.html#ACCEPT_NONE

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜