1
我在我的项目中使用ASIHTTPRequest,我有一个iPhone 3G的问题。 我发送一个请求:ASIHTTPRequest与iPhone 3G
NSURL* pageURL = [NSURL URLWithString:@"https://accounts.google.com/ServiceLogin?service=sj"];
loginPageRequest = [[ASIHTTPRequest alloc] initWithURL:pageURL];
[loginPageRequest setTimeOutSeconds:30];
[loginPageRequest setDelegate:self];
[loginPageRequest startAsynchronous];
,并在其他设备中我得到一个responde到:
- (void)requestFinished:(ASIHTTPRequest *)request
,并在iPhone 3G,我收到了很多次:
- (void)requestFailed:(ASIHTTPRequest *)request
与错误MSG:The request timed out
我设置请求超时为30秒。
任何想法为什么会发生?
可能是你的ASIHTTPRequest在3G需要更多的时间,所以改变30到90并尝试它 – iDhaval 2012-04-10 10:37:40