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"的更多相关文章

  1. AFNetworking3.0出现Error Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptable

    在发送请求后一直报错, 浏览器解析却没有问题, 所以基本可以确定是AFNetworking的问题 下面是解决方法: AFHTTPSessionManager *manager = [AFHTTPSes ...

  2. Error Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptable con

    AFHTTPSessionManager * manager = [AFHTTPSessionManager manager]; manager.responseSerializer.acceptab ...

  3. iOS之AFN错误代码1016(Error Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptable)

    请参考这篇博客:点击查看

  4. Error Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptabl

    在使用AFNetworking 2.0  的时候本来一切很顺畅,但是中途遇到几个比较坑的地方 这里分享一下爬坑经历,忘读者不能速爬坑! 在发送请求后,NSURLSessionDataTask一直报错 ...

  5. AFNetworking 遇到错误 Code=-1016 "Request failed: unacceptable content-type: text/plain"

    在开发过程使用了AFNetworking库,版本2.x,先运行第一个官方例子(替换GET 后面的url即可): AFHTTPRequestOperationManager *manager = [AF ...

  6. {"timestamp":"2019-11-12T02:39:28.949+0000","status":415,"error":"Unsupported Media Type","message":"Content type 'text/plain;charset=UTF-8' not supported","path":&quo

    在Jmeter运行http请求时报错: {"timestamp":"2019-11-12T02:39:28.949+0000","status&quo ...

  7. AFNetWorking发送post请求,Code=-1016错误

    使用AFNetWorking发送post请求时,可能会出现下面Code=-1016问题.打印的error如下: Error:Error Domain=com.alamofire.error.seria ...

  8. AFNetWorking出现code=-1016错误解决办法

    报错类似: 2015-12-09 15:58:03.062 Carloans[14328:2300485] Error Domain=com.alamofire.error.serialization ...

  9. WebSocket connection to,Error during WebSocket handshake: Unexpected response code: 404

    使用标准的JSR 356注解时,需要使用tomcat 8.x版本,如果使用tomcat 7.x的版本,则需要继承WebSocketServlet,否则会报WebSocket connection to ...

随机推荐

  1. C/C++ 语言中的表达式求值(原文作者:裘宗燕)

    经常可以在一些讨论组里看到下面的提问:“谁知道下面C语句给n赋什么值?”m = 1; n = m+++m++;最近有位不相识的朋友发email给我,问为什么在某个C++系统里,下面表达式打印出两个4, ...

  2. 淘淘商城_day03_课堂笔记

    今日大纲 实现商品的编辑 实现商品的规格参数功能 搭建前台系统 实现首页商品类目的显示 商品的编辑 数据的编辑核心是:数据回显. 编辑按钮事件 判断选中的行数 弹出window 加载编辑页面,在页面加 ...

  3. 《JS权威指南学习总结--8.8.2高阶函数》

    内容要点: 所谓高阶函数(higher-order function)就是操作函数的函数,它接收一个或多个函数作为参数,并返回一个新函数. 例1: //这个高阶函数返回一个新的函数,这个新函数将它的实 ...

  4. CSS3秘笈复习:第七章

    1.边距冲突: 当元素的bottom margin碰到另一个元素的top margin可能会产生一些怪异的计算,浏览器会忽略小的那个值而使用大的值. 2.边距折叠: 假设要在警告框里插入一个标题,并且 ...

  5. 关于input在li列表中居中显示

    input属于置换元素(replaced element),置换元素主要是指img,input,textarea,select,object等这类默认就有CSS格式化外表范围的元素,这些元素的垂直居中 ...

  6. php日期转时间戳,指定日期转换成时间戳

    写过PHP+MySQL的程序员都知道有时间差,UNIX时间戳和格式化日期是我们常打交道的两个时间表示形式,Unix时间戳存储.处理方便,但 是不直观,格式化日期直观,但是处理起来不如Unix时间戳那么 ...

  7. apache动态编译与静态编译

    静态: 在使用./configure 编译的时候,如果不指定某个模块为动态,即没有使用:enable-mods-shared=module或者enable-module=shared 这个2个中的一个 ...

  8. 【转】别人家的孩子之《说说我的web前端之路,分享些前端的好书》

    链接http://www.cnblogs.com/Darren_code/archive/2011/02/09/JavaScript.html   2011-10-31 22:56 by 聂微东 PS ...

  9. xlrd doc

    The xlrd Module A Python module for extracting data from MS Excel ™ spreadsheet files. Version 0.7.3 ...

  10. MongoDB数据模型(三)

    六.数据模型引用 文档 我们已经知道MongoDB以文档的形式存储数据,而文档是JSON风格的数据结构,由一系列的“字段名-值”对组成,如下所示 { "item": "p ...