From db7c8ddc6e021006412f86bd614429ad3fd700b0 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 17 Jan 2022 17:37:17 +0300 Subject: Ignore cache when making HTTP requests --- Juick/API.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Juick/API.m b/Juick/API.m index 4c3edc2..137c0b6 100644 --- a/Juick/API.m +++ b/Juick/API.m @@ -185,7 +185,7 @@ NSString * const JuickErrorDomain = @"JuickErrorDomain"; } -(void) fetchDataWithURL:(NSURL *) url data:(NSData *)postData boundary:(NSString *)boundary authorizationHeader:(NSString *)header callback:(void(^)(NSData *, NSError *))callback { - NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData timeoutInterval:60.0]; if (header) { [request addValue:header forHTTPHeaderField:@"Authorization"]; } -- cgit v1.2.3