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. openstack添加数据库

    输入:neutron-db-manage revision -m "表的名称"        neutron-db-manage upgrade head 如果遇到版本名找不到的情 ...

  2. Adding DOM elements to document

    1.JavaScript 添加DOM Element 执行效率比较: 抄自:http://wildbit.com/blog/2006/11/21/javascript-optimization-add ...

  3. 关于ajax后台success传来json数据的问题

    最近在使用JQuery的ajax方法时,需要返回的数据为json数据,在success返回中数据处理会根据返回方式不同会采用不同的方式来生成json数据.在$.ajax方法中应该是如何来处理的,简单进 ...

  4. openstack私有云布署实践【12.1 网络Neutron-controller节点配置(科兴环境)】

    网络这一块推荐使用的是 Neutron--LinuxBirdge的Ha高可用,此高可用方案对Public作用不是很大,Public只用到DHCP,而Private则会用到L3 Agent,则此方案是有 ...

  5. 版本控制器:SVN

    版本控制器:SVN 开发中的实际问题 小明负责的模块就要完成了,就在即将Release之前的一瞬间,电脑突然蓝屏,硬盘光荣牺牲!几个月来的努力付之东流--需求之一:备份! 这个项目中需要一个很复杂的功 ...

  6. 《Windows编程循序渐进》——建立MFC应用程序

    如何建立MFC应用程序 打开VS2013:

  7. Haskell 函数式编程

    Haskell是纯函数式编程,它强调不函数不改变外部世界状态,即,一个函数的输出只由函数接收的输入决定.那如何与外面沟通呢,比如读取一个文件内容并输出这个文件内容(字符串),显然这种函数非纯函数,因为 ...

  8. Gentoo安装详解(二)-- 编译内核

    编译内核: 安装内核源码: 选择内核:如gentoo-sources emerge gentoo-sources ls -l /usr/src/linux 手动编译内核: cd /usr/src/li ...

  9. dell 去鼠标版功能widnows

    桌面计算机(点击右键)----管理----设备管理器-----鼠标------选择触摸板(ps/2 兼容鼠标)---右击------跟新驱动-------浏览计算机查找------从计算机列表中选择- ...

  10. zabbix 监控mysql主从

    这里记录了,每次都百度查询多次. zabbix默认包含mysql监控 其中包含 mysql的基本状态监控 MySQL主从监控需要结合自定义 1)目前项目需求 只对 Slave_IO_Running . ...