即使请求似乎工作正常(因为更改实际上发生在站点上),我仍然从 AFNetworking 收到一个严重错误。
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);
}];
谢谢您的帮助