ASIHTTPRequest *request = [[ASIHTTPRequest alloc]initWithURL:[NSURL URLWithString:url]];
request.requestHeaders = header;
request.requestMethod = @"GET";
request.tag = DBRequestTypeChannelCategory;
[request setDelegate:self];
[request setNumberOfTimesToRetryOnTimeout:2];
[request setDownloadCache:[ASIDownloadCache sharedCache]];
[request setCacheStoragePolicy:ASICachePermanentlyCacheStoragePolicy];
[request setCachePolicy:ASIFallbackToCacheIfLoadFailsCachePolicy];
[request setSecondsToCache:60*60*24*3];
[request startAsynchronous];
これは、http に関する私のコードであり、モデルを飛ばすように携帯電話をオンにした場合です。私はこれを得た
Error Domain=ASIHTTPRequestErrorDomain Code=1 "A connection failure occurred" UserInfo=0x1fd67bf0 {NSUnderlyingError=0x1fd66bf0 "The operation couldn’t be completed. (kCFErrorDomainCFNetwork error 2.)", NSLocalizedDescription=A connection failure occurred}