I'm creating NSMutableRequest and adding data to body. Heres example how I do it:
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:stringURL]
cachePolicy:NSURLRequestReloadIgnoringLocalCacheData
timeoutInterval:230.0];
NSLog(@"Time out interval: %f", request.timeoutInterval); >> Output: 230
[request setHTTPBody:[body dataUsingEncoding:NSUTF8StringEncoding]];
NSLog(@"Time out interval: %f", request.timeoutInterval); >> Output: 240
[request setTimeoutInterval:230];
NSLog(@"Time out interval: %f", request.timeoutInterval); >> Output: 240
Request timeout after creating it is 230. After I set body It is 240. And after I reset it to 230. It is still 240. Timeout value doesn't change unless I set it bigger?
Anyone has any idea why it is happening? How to make timeout interval less than 240 seconds?