开发者

No http headers

I am trying to find the http headers but I don't think my method is working. I am using

- (BOOL)webView:(UIWebView *)webView2 shouldStartLoadWithRequest:(NSURLRequest *)request
 navigationType:(UIWebViewNavigationType)navigationType {

NSMutableURLRequest *req = (NSMutableURLRequest *)request;

NSLog(@"u开发者_开发技巧ser agent = %@", [req valueForHTTPHeaderField: @"User-Agent"]);
NSLog(@"http headers = %@", [request allHTTPHeaderFields]);
NSLog(@"http headers = %@", [req allHTTPHeaderFields]);

}

But the NSLog is printing out

http headers = {

Both req and request are not nil. Does anyone know why I am unable to get the headers?

Thanks Clinton

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜