4
即使請求似乎工作正常(因爲更改實際發生在網站上),我正在從AFNetworking得到一個嚴重錯誤。AFNetworking錯誤域代碼= -999?但工作正常?
Error Domain=NSURLErrorDomain Code=-999 "The operation couldn’t be completed
(NSURLErrorDomain error -999.)" UserInfo=0x1fd4a080
{NSErrorFailingURLKey=http://gcm.greenlightdispatch.com/services/json/}
奇怪的是,它返回這個錯誤,但它實際上並沒有完成要求的問題(在服務器上,該信息通過就好了和所有)。
AFHTTPClient *httpClient = [[[AFHTTPClient alloc] initWithBaseURL:url] autorelease];
[httpClient postPath:@"" parameters:[NSDictionary dictionaryWithDictionary:params]
success:^(AFHTTPRequestOperation *operation, id responseObject) {
NSLog(@"Success: %@", [responseObject objectFromJSONData]);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"Error: %@", error.description);
}];
感謝您的幫助
可能重複http://stackoverflow.com/questions/1024748/how-do-i-fix-nsurlerrordomain-error- 999-in-iphone-3-0-os) – Undo