我在用着
NSMutableURLRequest *request = [self requestWithMethod:@"GET" path:@"paths/" parameters:params];
AFJSONRequestOperation *jsonRequest = [AFJSONRequestOperation
JSONRequestOperationWithRequest:request success:^(NSURLRequest *request,
NSHTTPURLResponse *response, id JSON) {
// something to do here in case of success
} failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON
{
// and something there in case of failure
}
一切正常,除了在一种情况下,当我收到带有400 状态代码的响应和JSON
包含有关此错误的一些信息的(有效,我已检查)时,正如我使用浏览器所看到的那样。但是JSONRequestOperationWithRequest
调用成功块,JSON
并且响应为零。什么可能导致这种情况?