Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptable content-type: text/html"
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"的更多相关文章
- AFNetworking3.0出现Error Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptable
在发送请求后一直报错, 浏览器解析却没有问题, 所以基本可以确定是AFNetworking的问题 下面是解决方法: AFHTTPSessionManager *manager = [AFHTTPSes ...
- Error Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptable con
AFHTTPSessionManager * manager = [AFHTTPSessionManager manager]; manager.responseSerializer.acceptab ...
- iOS之AFN错误代码1016(Error Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptable)
请参考这篇博客:点击查看
- Error Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptabl
在使用AFNetworking 2.0 的时候本来一切很顺畅,但是中途遇到几个比较坑的地方 这里分享一下爬坑经历,忘读者不能速爬坑! 在发送请求后,NSURLSessionDataTask一直报错 ...
- AFNetworking 遇到错误 Code=-1016 "Request failed: unacceptable content-type: text/plain"
在开发过程使用了AFNetworking库,版本2.x,先运行第一个官方例子(替换GET 后面的url即可): AFHTTPRequestOperationManager *manager = [AF ...
- {"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 ...
- AFNetWorking发送post请求,Code=-1016错误
使用AFNetWorking发送post请求时,可能会出现下面Code=-1016问题.打印的error如下: Error:Error Domain=com.alamofire.error.seria ...
- AFNetWorking出现code=-1016错误解决办法
报错类似: 2015-12-09 15:58:03.062 Carloans[14328:2300485] Error Domain=com.alamofire.error.serialization ...
- WebSocket connection to,Error during WebSocket handshake: Unexpected response code: 404
使用标准的JSR 356注解时,需要使用tomcat 8.x版本,如果使用tomcat 7.x的版本,则需要继承WebSocketServlet,否则会报WebSocket connection to ...
随机推荐
- oracle 删除当前用户下所有的表、索引、序列...
select 'drop table "' || table_name ||'";'||chr(13)||chr(10) from user_tables; --delete t ...
- Rx学习
RXjava学习资料: https://www.gitbook.com/book/yuxingxin/rxjava-essentials-cn/details 如下只是学习笔记而已,后面添加实战案例, ...
- Windows后渗透
My 命令行下收集主机信息 使用wmic识别安装到系统中的补丁情况: wmic qfe get description,installedOn 识别正在运行的服务: sc query type= se ...
- JS复习:第二十三章
一.Cookie的构成: 1.名称:一个唯一确定cookie的名称.cookie名称不区分大小写,必须是经过URL编码的. 2.值:存储在cookie中的字符串值,必须被URL编码. 3.域:cook ...
- 【LeetCode】462. Minimum Moves to Equal Array Elements II
Given a non-empty integer array, find the minimum number of moves required to make all array element ...
- 12.hibernate命名查询
1.创建如下javaweb项目结构 2.在项目的src下创建hibernate.cfg.xml主配置文件 <?xml version="1.0" encoding=" ...
- STL学习:STL库vector、string、set、map用法
本文仅介绍了如何使用它们常用的方法. vector 1.可随机访问,可在尾部插入元素:2.内存自动管理:3.头文件#include <vector> 1.创建vector对象 一维: (1 ...
- HDU 1264 Counting Squares(模拟)
题目链接 Problem Description Your input is a series of rectangles, one per line. Each rectangle is speci ...
- C# 语言规范_版本5.0 (第2章 词法结构)
1. 词法结构 1.1 程序 C# 程序 (program) 由一个或多个源文件 (source file) 组成,源文件的正式名称是编译单元 (compilation unit)(第 9.1 节). ...
- 如何在Excel中少犯二(I)
作者:何明科链接:https://zhuanlan.zhihu.com/p/23472480来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处. 收到不少建议,要求开知乎Li ...