码迷,mamicode.com
首页 > 其他好文 > 详细

AFN发送请求失败

时间:2015-11-04 12:47:31      阅读:388      评论:0      收藏:0      [点我收藏+]

标签:

发送请求出现这个错误
 Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)" (JSON text did not start with array or object and option to allow fragments not set.) UserInfo=0x7fa97c8cb480 {NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set., NSUnderlyingError=0x7fa97c8794b0 "Request failed: unsupported media type (415)"}

系解析失败, 需要更改解析器为:

mgr.requestSerializer=[AFJSONRequestSerializer serializer];

AFN发送请求失败

标签:

原文地址:http://www.cnblogs.com/Rinpe/p/4935453.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!