【发布时间】:2015-03-18 16:26:21
【问题描述】:
我有一个https 请求发送到服务器,现在我想访问webViewDidFinishLoad 中的响应(NSURLResponse)。我如何访问它?
didReceiveResponse 用于处理https 部分,所以我还不能真正使用该响应。
我当前的 didReceiveResponse 方法如下所示
-(void) connection:(NSURLConnection *) connection didReceiveResponse:(NSURLResponse *)response
{
_authenticated = YES;
[myWebView loadRequest:req];
[con cancel];
}
【问题讨论】:
-
谷歌的快速浏览似乎说没有直接的方法,但显然,网络视图缓存响应 - 由请求键入 - 在 NSURLCache sharedURLCache 中。例如看到这个可能的重复stackoverflow.com/questions/22325818/…
-
@danh - 它仅适用于可缓存的 URL
标签: ios objective-c webview