Android WebView get raw cookie information

不想你离开。 提交于 2019-12-13 12:30:43

问题


I try to get cookie information with CookieManager in Android WebView. However, all it does is providing a key value pair of cookies, no additional information.

I also tried this post and use connection.getHeaderFields.get("Set-Cookie"); to get all cookies received from server. But from what I can tell, I don't see all cookies that I am supposed to receive from server. This can also be found by some cookies in CookieManger receive a new value but not show in Set-Cookie field.

Ideally, I would like to intercept every response and inspect their cookies with all information from server such as name, value, max-age, secure, etc. Any suggestion how to do this with Android WebView (WebViewClient)?

来源:https://stackoverflow.com/questions/49835438/android-webview-get-raw-cookie-information

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!