Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptable content-type: text/html"
2015-11-17 14:04
597 查看
2015-11-16 10:39:17.235 PullDemo[338:60b] Application windows are expected to have a root view controller at the end of application launch
2015-11-16 10:39:17.500 PullDemo[338:60b] Error Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptable content-type: text/html" UserInfo=0x8d3a640 {com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x8d559f0> { URL: http://www.baidu.com/ } { status code: 200, headers {
"Cache-Control" = "no-cache";
Connection = "Keep-Alive";
"Content-Encoding" = gzip;
"Content-Length" = 3174;
"Content-Type" = "text/html;charset=utf-8";
Date = "Mon, 16 Nov 2015 02:39:17 GMT";
Server = apache;
"Set-Cookie" = "H_WISE_SIDS=100037; path=/; domain=.baidu.com";
traceid = 144764155704053939308606070253431897318;
} }, NSErrorFailingURLKey=http://www.baidu.com/, NSLocalizedDescription=Request failed: unacceptable content-type: text/html,
afnetworking的这个错误大家不陌生吧,解决方法
AFURLResponseSerialization.m的223行加上@"text/html"就可以解决了
2015-11-16 10:39:17.500 PullDemo[338:60b] Error Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptable content-type: text/html" UserInfo=0x8d3a640 {com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x8d559f0> { URL: http://www.baidu.com/ } { status code: 200, headers {
"Cache-Control" = "no-cache";
Connection = "Keep-Alive";
"Content-Encoding" = gzip;
"Content-Length" = 3174;
"Content-Type" = "text/html;charset=utf-8";
Date = "Mon, 16 Nov 2015 02:39:17 GMT";
Server = apache;
"Set-Cookie" = "H_WISE_SIDS=100037; path=/; domain=.baidu.com";
traceid = 144764155704053939308606070253431897318;
} }, NSErrorFailingURLKey=http://www.baidu.com/, NSLocalizedDescription=Request failed: unacceptable content-type: text/html,
afnetworking的这个错误大家不陌生吧,解决方法
AFURLResponseSerialization.m的223行加上@"text/html"就可以解决了
相关文章推荐
- UITabBarController的简单使用和属性方法总结
- 界面干货盘点 | 海量实用UI工具及示例等你来体验!
- easyui超链接中使用session值
- Android开发中关于UI图片资源的问题
- EasyUI DataGrid View
- LeetCode(232) Implement Queue using Stacks
- LeetCode(232) Implement Queue using Stacks
- 400 Bad Request
- 用SpriteBuilder简化"耕牛遍地走"的动画效果(三)
- 用SpriteBuilder简化"耕牛遍地走"的动画效果(三)
- 用SpriteBuilder简化"耕牛遍地走"的动画效果(三)
- 用SpriteBuilder简化"耕牛遍地走"的动画效果(二)
- 用SpriteBuilder简化"耕牛遍地走"的动画效果(二)
- 用SpriteBuilder简化"耕牛遍地走"的动画效果(二)
- 用SpriteBuilder简化"耕牛遍地走"的动画效果(一)
- 用SpriteBuilder简化"耕牛遍地走"的动画效果(一)
- 用SpriteBuilder简化"耕牛遍地走"的动画效果(一)
- SpannableStringBuilder.setSpan()的细节
- iOS 9 学习系列:UI Testing
- GUID 全局唯一标识符