AFNetworking 2.0 提示出错!text/plain

AFNetworking 2.0 默认不支持text/html

1、提示出错!text/plain

AFN出错.png

2、AFNetworking 2.0 默认不支持text/html

  • 解决:在库了找到它,然后添加一个 @"text/html",编译!!!

解决.png

3、在库找到下面的这句代码,对应修改就可以了:

AFURLResponseSerialization.m  ->   self.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", nil]; 添加 @"text/html" .

你可能感兴趣的:(AFNetworking 2.0 提示出错!text/plain)