关于AFNetworking code-1016
2016-06-07 16:35
225 查看
AFURLResponseSerialization.m 文件里
AFJSONResponseSerializer 实现方法
- (instancetype)init 中
self.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", nil];
修改为
self.acceptableContentTypes = [NSSetsetWithObjects:@"application/json",@"text/json",@"text/javascript",@"text/html",nil];
如果有中文修改为
self.acceptableContentTypes = [NSSet
setWithObjects:@"application/json",
@"text/json", @"text/javascript",@"text/html",
@"text/plain", nil];
AFJSONResponseSerializer 实现方法
- (instancetype)init 中
self.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", nil];
修改为
self.acceptableContentTypes = [NSSetsetWithObjects:@"application/json",@"text/json",@"text/javascript",@"text/html",nil];
如果有中文修改为
self.acceptableContentTypes = [NSSet
setWithObjects:@"application/json",
@"text/json", @"text/javascript",@"text/html",
@"text/plain", nil];
相关文章推荐
- 货币/钱计算
- iOS多线程小结( NSOperation)
- 采用HttpClient3.x上传文件 spring 文件上传
- 面试过程中涉及的问题
- [GitHub]第七讲:GitHub issues
- Leetcode 之Construct Binary Tree(52)
- [GitHub]第六讲:开源项目贡献流程
- 数据结构实验之链表一:顺序建立链表
- Android程序报错:Unable to add window——token android.os.BinderProxy@431e65b8 is not valid
- 腾讯如何打造一款实时对战手游
- windows 10 安装 hexo 续
- 数据分析入门随笔
- OpenWrt添加LuCI的模块
- 公式编辑测试
- Linux安装配置Tomcat
- js call
- [GitHub]第六讲:开源项目贡献流程
- SpringMVC:JSON形式输出(基于Fastjson)
- Python调用C++底层库,互相传值问题
- html Div层的展开与收缩的特效源代码下载