0
我正在创建NSMutableRequest并将数据添加到正文。继承人的例子,我是怎么做的:如何设置正文后设置NSMutableRequest超时小于240秒?
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
请求超时创建后是230 后,我设置的身体是240 后,我将其重置为230。它仍然是240超时值不除非我把它设置得更大才改变?
任何人都有任何想法为什么发生?如何使超时间隔小于240秒?