AFNetworking Error

Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)" (Garbage at end.) UserInfo=0x7fe1eb271760 {NSDebugDescription=Garbage at end.}

这个问题就是 服务端返回的数据有问题。
解答如下:
http://stackoverflow.com/questions/27915879/apns-error-domain-nscocoaerrordomain-code-3840

The error message is telling you exactly what's wrong: the response from your server doesn't contain valid JSON. Technically, JSON must start with either an array or an object (dictionary). Whatever your server is returning isn't. You can force the JSON to be consumed regardless by using the NSJSONReadingAllowFragments
option.

意思就是 数据库返回的数据应该是一个 数组或者字典,而你的返回应该有问题,可以自己看看 post过来的数据,叫服务端的同事去修改问题。

你可能感兴趣的:(AFNetworking Error)