I have a UIWebView that navigates to a webpage using Basic Authorisation using this code
NSString *authValue = [NSString stringWithFormat:@"Basic %@", AFBase64EncodedStringFromString(basicAuthCredentials)];
[urlRequest setValue:authValue forHTTPHeaderField:@"Authorization"];
Now when a link is clicked, the webView’s shouldStartLoadWithRequest is fired but the page isn’t loaded because the next page also needs the authorisation.
Is there a way to automatically add the Auth to the links clicked?
Thanks
How to properly create a new request in shouldStartLoad
EDIT: Sorry, I wasn’t taking into account that NSURLRequest != NSMutableURLRequest. I’ll update the code.