RNCachingURLProtocol
RNCachingURLProtocol copied to clipboard
Simple offline caching for UIWebView and other NSURLConnection clients
Fix link
I want use a quick way.
There is an issue compiling this code where Xcode complaint about issue we NSURLConnect ion is deprecated. [connectionRequest setValue:@"" forHTTPHeaderField:RNCachingURLHeader]; NSURLConnection *connection = [NSURLConnection connectionWithRequest:connectionRequest delegate:self]; [self setConnection:connection];
Signed-off-by: Dominik Pich [email protected] added block to define what to handle, updated read, updated example
All the major events of an NSURLProtocolClient are tracked. I also added the ability to disable caching, so this can be used just as a URL system logging framework.
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...
.idea
Dude, why you did that :( It's fuckin ugly
I see the example where pages are retrieved and everything is cached correctly. The next time I load the same url, I see the X-RNCache header. However, Is there a...
For some reason, when using RNCachingURLProtocol together with AFNetworking, all my POST requests (JSON) to the API by AFNetworking stopped working. Took me a while to find out that RNCachingURLProtocol...