iOS开发之解决AFN出现Error Domain=com.alamofire.error.serialization.response Code=-1016 "

Xcode项目搜索AFN

self.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", nil];  

替换成

self.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript",@"text/html",nil];

其实就是多添加了

@"text/html"

AFN3.0之后需要修改两处地方,请勿遗漏

你可能感兴趣的:(iOS开发之解决AFN出现Error Domain=com.alamofire.error.serialization.response Code=-1016 ")