AFNetWorking获取errorData

来源:互联网 发布:对比度调整算法 编辑:程序博客网 时间:2024/06/08 18:20

NSDictionary *UserInfo = error.userInfo;

NSHTTPURLResponse * responses = UserInfo[@"com.alamofire.serialization.response.error.response"];

NSDictionary *errorDict = [NSJSONSerializationJSONObjectWithData:UserInfo[@"com.alamofire.serialization.response.error.data"options:NSJSONReadingMutableContainers error:nil];

NSString *errorStr = errorDict[@"Message"];


1 0