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 ...
随机推荐
- cocos2d-3.x 创建动画
1.多文件帧序列动画 TrademarkAnimation.h #ifndef __TRADEMARK_ANIMATION_H__ #define __TRADEMARK_ANIMATION_H__ ...
- 对adapter的封装优化
一般不优化的adapter通常继承自BaseAdapter会出现一下几个问题: getCount(), getItem(), getItemId()代码都要去重写,一个adapter还行,如果adap ...
- Java线程池主线程等待子线程执行完成
今天讨论一个入门级的话题, 不然没东西更新对不起空间和域名~~ 工作总往往会遇到异步去执行某段逻辑, 然后先处理其他事情, 处理完后再把那段逻辑的处理结果进行汇总的产景, 这时候就需要使用线程了. 一 ...
- mysql 初始化修改密码问题(Mac系统)
今天公司大牛帮我搞定了mysql初始化密码问题,纪录一下: ~ ps aux | grep mysqlMetro 7149 0.0 0.0 2432772 564 s000 R+ 7:16下午 0:0 ...
- js--事件对象的理解4
阻止默认行为:1.实例-简易修改右键菜单<script>document.oncontextmenu=function (ev){ var oEvent=ev||event; var oU ...
- 2016年团体程序设计天梯赛-决赛 L1-1. 正整数A+B(15)
本题的目标很简单,就是求两个正整数A和B的和,其中A和B都在区间[1,1000].稍微有点麻烦的是,输入并不保证是两个正整数. 输入格式: 输入在一行给出A和B,其间以空格分开.问题是A和B不一定是满 ...
- maven项目构建
Maven是apache的一个开源项目.是一个用来把源代码构建成可发布的构件的工具. Maven的功能非常强大,可以认为是一个项目管理工具,不仅仅是一个构建工具. Maven本身的核心很小,但是可以在 ...
- (转)提高代码质量---one
1. 摘要 这是烂代码系列的第二篇,在文章中我会跟大家讨论一下如何尽可能高效和客观的评价代码的优劣. 在发布了关于烂代码的那些事(上)之后,发现这篇文章竟然意外的很受欢迎,很多人也描(tu)述(cao ...
- hdu_5862_Counting Intersections(扫描线)
题目链接:hdu_5862_Counting Intersections 题意: 给你与坐标轴平行的线段,问你交点数 题解: 实质就是扫描线,这里我用树状数组来记录,所有线段按X坐标排序,遇到横线段的 ...
- Graph Algorithm
1.定义 A graph consists of a set of vertices V and a set of edges E. Each edge is a pair (v, w), where ...