新增个人想法:
1、尽量使用postman
2、青花瓷
why
根本找不到
比如下面接口状态200
以上新增
以下为原内容
请求接口401 错误
#import "AFURLResponseSerialization.h"
NSData * data = error.userInfo[AFNetworkingOperationFailingURLResponseDataErrorKey];
id body = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
NSDictionary *bodyDic = (NSDictionary*)body;
NSMutableDictionary *errDic = [[NSMutableDictionary alloc] init];
if ([bodyDic stringForKey:@"error"]) {
errDic[@"error"] = [bodyDic stringForKey:@"error"];
}