I need to set the HTTP header for a request. In the documentation for the NSURLRequest class I didn\'t find anything regarding the HTTP header. How can I set the HTTP header
I know its late but may help others , For SWIFT 3.0
let url = NSURL(string: "http://www.yourwebsite.com") let mutAbleRequest = NSMutableURLRequest(URL: url!) mutAbleRequest.setValue("YOUR_HEADER_VALUE", forHTTPHeaderField:"YOUR_HEADER_NAME") myWebView.loadRequest(mutAbleRequest)