【iOS】iOS Error Domain=NSCocoaErrorDomain Code=3840 "未能完成操作。(“Cocoa”错误 3840。)"

昨天遇到的这个问题,详细信息:

----->类和方法__25+[Manager noticeRequest:]_block_invoke399----->错误信息Error Domain=NSCocoaErrorDomain Code=3840 "未能完成操作。(“Cocoa”错误 3840。)" (JSON text did not start with array or object and option to allow fragments not set.) UserInfo=0x14f7aa30 {NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set., NSUnderlyingError=0x14faebd0 "Request failed: not found (404)"}

寻找方法中…………

Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)" 提供了一种方法,虽然和我的不一样,但根据这篇文章也得到了解决办法!打印出 option,得到如下信息:

仔细观察后发现了问题:网址 中少加了一个 “/” !!

粗心大意常犯错…………

原文地址:https://www.cnblogs.com/jaxer/p/4812200.html