使用AFNetworking时遇到这情况
解决方法:
在AFNetworking的源文件AFURLResponseSerialization.m中修改代码就能解决:
修改文件223行处
self.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", nil];
为
self.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript",@"text/html", nil];
网友评论