My iOS UIWebView page is based on Cordova open source framework, and I want to add some customize http headers in its webview URL request, my solution is to add them in the foll
I know its late but may help others for SWIFT 3.0
let weburl = NSURL(string: "http://www.mywebsite.com") let request = NSMutableURLRequest(URL: weburl!) request.setValue("HEADER_VALUE", forHTTPHeaderField:"HEADER_NAME") myWebView.loadRequest(request)