您的位置:首页 > 产品设计 > UI/UE

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"就可以解决了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: