开发者

Do requests in UIWebView use sharedHTTPCookieStorage?

From googling a bit, the answer to my question is "yes". But how do I test that?

I trie开发者_运维问答d to inpsect the HTTP request headers (i.e. [request allHTTPHeaderFields]) in webView:shouldStartLoadWithRequest:navigationType:, but none of the request has the "Cookie" entry, even though cookies are successfully stored in [NSHTTPCookieStorage sharedHTTPCookieStorage].


try this to loop through all the cookies in the UIWebView to verify they are there

NSHTTPCookie *aCookie;
for (aCookie in [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies]) {
   NSLog(@"%@", aCookie);
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜