[webkit-dev] Adding HTTP headers to URL request in WebView

Mark Rowe mrowe at apple.com
Mon Sep 29 00:20:08 PDT 2008


On Sep 29, 2008, at 12:11 AM, Bill Patterson wrote:

> I need to add several HTTP headers to the URL request that is sent
> after the user clicks any HTTP link in a WebView.
>
> I am having difficulty finding a delegate that gives me access the
> NSURLRequest before it is "deep copied", so that I can replace it with
> a NSMutableURLRequest.

-webView:resource:willSendRequest:redirectResponse:fromDataSource:
> Invoked before a request is initiated for a resource and returns a  
> possibly modified request.
>

<http://developer.apple.com/documentation/Cocoa/Reference/WebKit/Protocols/WebResourceLoadDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/instm/NSObject/webView:resource:willSendRequest:redirectResponse:fromDataSource: 
 >

- Mark



More information about the webkit-dev mailing list