开发者

View the http header of response

开发者 https://www.devze.com 2023-02-02 05:40 出处:网络
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 h

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.

0

精彩评论

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