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 ...
随机推荐
- LoadRunner参数值定义-摘自一米阳光
深入解析LoadRunner下的参数化取值 熟悉LoadRunner的人,相信都会经常使用参数化功能,但是对于参数化的使用到底了解多少,就值得深思了.包括本人在内也是,每次在做压力测试的时候,基本 ...
- LeetCode 之 Triangle
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent n ...
- 快捷高效的cmd命令
经常在网上逛一些博客看一些技术文章,但是每每看过之后又忘记保存,或者东存一下,西存一下,到需要的时候回过头来,往往都找不到了.所以开通这个博客,把看到的好东西都记录下来,以便回头查看,也能与大家分享分 ...
- unity3d 学习过程记录
通过泰克在线,开始学习视频教程 1.学习 Unity3d零基础教学初级篇:熟悉一下unity编辑器结构和控件以及对控件的基本操作 2.学习Roll-a-ball小项目开发:通过练习制作小游戏,巩固所学 ...
- 版本控制器:SVN
版本控制器:SVN 开发中的实际问题 小明负责的模块就要完成了,就在即将Release之前的一瞬间,电脑突然蓝屏,硬盘光荣牺牲!几个月来的努力付之东流--需求之一:备份! 这个项目中需要一个很复杂的功 ...
- HDU 5821 Ball
记录一下每个位置最终到达的位置.然后每次操作排序. #pragma comment(linker, "/STACK:1024000000,1024000000") #include ...
- 登录SQL注入
在登录页面的账号密码的输入框中分别输入,这个值:1' or '1'='1 一,验证的数据库语句,讲传人的值组合成数据库语句: public DataTable CheckLogin(string na ...
- PAT 团体程序设计天梯赛-练习集 L2-003. 月饼
月饼是中国人在中秋佳节时吃的一种传统食品,不同地区有许多不同风味的月饼.现给定所有种类月饼的库存量.总售价.以及市场的最大需求量,请你计算可以获得的最大收益是多少. 注意:销售时允许取出一部分库存.样 ...
- 比较不熟的JavaScript点滴,慢慢前行,附带简单复杂化的php小计算器一份
interface.php <html> <head> <meta charset="utf-8" /> <title>这是一个简单 ...
- chapter 13_2 关系类、库定义的元方法
元表还可以指定关系操作符的含义,元方法为__eq ,__lt(小于) ,__le(小于等于). 而其它3个关系操作符则没有单独的元方法,Lua会 把a ~= b 转化为not(a == b) 将a&g ...