在iOS中使用ASIHTTPRequest获取错误“操作无法完成。操作超时”

时间:2014-01-29 05:59:26

标签: ios ios4 nsurlconnection asihttprequest connection-timeout

请求调用后立即抛出错误。知道如何解决这个问题吗?

请在下面找到代码和错误:

ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:strUrl]];
            request.shouldAttemptPersistentConnection   = NO;
            [request setShouldContinueWhenAppEntersBackground:YES];
            [request setTimeOutSeconds:600000];
            [request setDelegate:self];
            [request setDidFinishSelector:@selector(requestFinished:)];
            [request setDidFailSelector:@selector(requestFailed:)];
            [request setDidStartSelector:@selector(requestStarted:)];
            [request startAsynchronous];

错误:

  

错误域= ASIHTTPRequestErrorDomain代码= 1“连接失败   发生了“UserInfo = 0x15572bc0 {NSUnderlyingError = 0x15570b80”   操作无法完成。操作超时“,   NSLocalizedDescription =发生连接失败}

0 个答案:

没有答案
相关问题