View the http header of response
When working with UIWebViews, is there a way to capture a request (all GET requests - also for the page's content/images etc.) on the way so that I can examine the requ开发者_如何学运维est/response headers (without resolving to wireshark)?
You can set the delegate of the webview and capture the request by function below.
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
Then exam the request header inside the request object.
精彩评论