Reputation: 1588
I am trying to set the request timeout as 120 for the NSMutableURLRequest, but it is ignoring. The request timout fails within 90 secs. Can any one tell me how to set the request timeout for the NSMutableURLRequest ?? . I have gone through some links stating that about the default timeout value as 240 secs. I can't find any apple document describing about that . Can anyone help me ?
NSMutableURLRequest* urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:serverURL]];
[urlRequest setHTTPMethod:@"GET"];
[urlRequest setTimeoutInterval:120];
_urlConnection = [[NSURLConnection alloc] initWithRequest:urlRequest delegate: self];
Upvotes: 0
Views: 979
Reputation: 12333
It is true. minimum is 240 sec. set below that will be ignored.
why don't you find alternative instead of finding the prof.
You can use ASIHTTPRequest. you may set setTimeOutSeconds:
& setNumberOfTimesToRetryOnTimeout:
as you want. Note: developers has stop maintaining this project, but it's stable for now. for IOS 5.x or above, you may look other alternative.
Upvotes: 1