AFN发送请求失败

发送请求出现这个错误
 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];

posted @   Rinpe  阅读(510)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示