Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost."
iOS开发,用AFNETWORKINGPOST出现以下错误:ErrorDomain=NSURLErrorDomainCode=-1005"Thenetworkconnec...
iOS开发,用AFNETWORKING POST出现以下错误:
Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo=0x7fbce34d28a0 {NSUnderlyingError=0x7fbce582adf0 "The network connection was lost.", NSErrorFailingURLStringKey=http://192.168.1.198/publishing, NSErrorFailingURLKey=http://192.168.1.198/publishing, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=54, NSLocalizedDescription=The network connection was lost.}
嘻嘻,我是为了自问自答来的~~
原因:我post的URL有问题。后台给的URL是: http://192.168.1.198/publishing,需要在结尾加上斜杠,即
http://192.168.1.198/publishing/ 然后就OK了。妹的这个破问题耽误了我两天的进度 展开
Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo=0x7fbce34d28a0 {NSUnderlyingError=0x7fbce582adf0 "The network connection was lost.", NSErrorFailingURLStringKey=http://192.168.1.198/publishing, NSErrorFailingURLKey=http://192.168.1.198/publishing, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=54, NSLocalizedDescription=The network connection was lost.}
嘻嘻,我是为了自问自答来的~~
原因:我post的URL有问题。后台给的URL是: http://192.168.1.198/publishing,需要在结尾加上斜杠,即
http://192.168.1.198/publishing/ 然后就OK了。妹的这个破问题耽误了我两天的进度 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励30(财富值+成长值)
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询