首页 > Web开发 > 详细

Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptable content-type: text/html"

时间:2015-11-17 14:11:34      阅读:710      评论:0      收藏:0      [点我收藏+]

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"就可以解决了

 

Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptable content-type: text/html"

原文:http://www.cnblogs.com/hualuoshuijia/p/4971535.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!