我已联系查尔斯检查呼叫的响应。响应标头返回 200OK,但即便如此,代码也会进入失败块。它是否与定义映射的方式有任何关系,还是其他一些微不足道的问题?
NSString *reviewsRequest = [NSString stringWithFormat:@"reviews/%@", reviewerId];
[MTAuthHandler refreshTokenIfExpired:^(id result, NSError *error) {
[MTRestkitManager instance].objectManager.requestSerializationMIMEType = RKMIMETypeJSON;
[[MTRestkitManager instance].objectManager getObjectsAtPath:reviewsRequest parameters:nil success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) {
NSLog(@"success");
if (completion) {
completion(YES, nil);
}
} failure:^(RKObjectRequestOperation *operation, NSError *error) {
NSLog(@"failed");
if (completion) {
completion(NO, error);
}
}];
}];
错误消息显示 - NSLocalizedDescription=(400-499)中的预期状态代码,得到 200
任何指针将不胜感激。