有没有办法从AFHTTPClient中获取失败块中的http状态代码?(is there an easy way to get the http status code in the failure block from AFHTTPClient?)
我看到有可以修改的接受的http状态代码列表,但是我认为如果我可以在故障块中获取http状态代码,那将会更加清晰。
好的,找到与操作对象的答案
failure:^(AFHTTPRequestOperation *operation, NSError *error){ NSLog(@"error code %d",[operation.response statusCode]); }];I see that there is a list of accepted http status codes that I can modify, but I think it would be cleaner if I can get the http status code in the failure block ..
Ok, found the answer with the operation object
failure:^(AFHTTPRequestOperation *operation, NSError *error){ NSLog(@"error code %d",[operation.response statusCode]); }];最满意答案
好的,找到与操作对象的答案
failure:^(AFHTTPRequestOperation *operation, NSError *error){ NSLog(@"error code %d",[operation.response statusCode]); }];Ok, found the answer with the operation object
failure:^(AFHTTPRequestOperation *operation, NSError *error){ NSLog(@"error code %d",[operation.response statusCode]); }];更多推荐
发布评论