Created
March 29, 2017 12:23
-
-
Save BramYeh/ed05e312be2c569f564e04066783c301 to your computer and use it in GitHub Desktop.
Add cookies into request that webview loads requests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// assume request is original request you want wkwebview to load | |
NSMutableURLRequest *mutableRequest = [request mutableCopy]; | |
[mutableRequest setValue:"CookieKey = CookieValue" forHTTPHeaderField:@"Cookie"]; | |
// navigates to a requested URL | |
[self.webView loadRequest:mutableRequest]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment