You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
can i register RNCachingURLProtocol before UIWebView init,and unregister it before ViewController's [self dismissViewControllerAnimated:YES completion:nil] ?
this solution will destroy RNCachingURLProtocol's cache?
this code may help,in you afhttprequest add the below code
[request setValue:@"YES" forHTTPHeaderField:@"iSAFNetwork"];
then in RNCachingURLProtocol.m in the method "+ (BOOL)canInitWithRequest:(NSURLRequest *)request" try to get the value :[request valueForHTTPHeaderField:@"iSAFNetwork"],if you get the value then return NO, don't use this protocol to handle it.
didFinishLaunchingWithOptions add:
[NSURLProtocol registerClass:[RNCachingURLProtocol class]];
then:
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; [manager POST:@"http://domain.com" parameters: …… success:…… ]
this request will be GET method type.
when annotation 「[NSURLProtocol registerClass:[RNCachingURLProtocol class]];」,AFHTTPRequest is successful.
The text was updated successfully, but these errors were encountered: