ios 什么是 kCFErrorDomainCFNetwork 代码=303
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25077284/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
what is kCFErrorDomainCFNetwork Code=303
提问by
I tried to post my textFiled data to Server.but when posting I got this error:
我试图将我的 textFiled 数据发布到 Server.but 发布时出现此错误:
Error: Error Domain=kCFErrorDomainCFNetwork Code=303 "The operation couldn't be completed. (kCFErrorDomainCFNetwork error 303.)" UserInfo=0x13786c60 {NSErrorFailingURLKey=http://192.168.3.125:8090/SaveDollar/rest/deals/add, NSErrorFailingURLStringKey=http://192.168.3.125:8090/SaveDollar/rest/deals/add}
错误:错误域=kCFErrorDomainCFNetwork 代码=303“操作无法完成。(kCFErrorDomainCFNetwork 错误 303。)” UserInfo=0x13786c60 {NSErrorFailingURLKey= http://192.168.3.125:8090/SaveDollar/restKeyNSErroringFailedStringURL = http://192.168.3.125:8090/SaveDollar/rest/deals/add}
I do not understand this error.
我不明白这个错误。
回答by Danny S
Is a parsing error from the server, when its response can't be parsed. You can look up the error codes in the CFNetworkErrors reference.
来自服务器的解析错误,当其响应无法解析时。您可以在CFNetworkErrors 参考中查找错误代码。
Make sure you set HTTPMethod to POST
确保将 HTTPMethod 设置为 POST
回答by Michael Peterson
kCFErrorHTTPParseFailure = 303,
The HTTP server response could not be parsed.
无法解析 HTTP 服务器响应。
From https://developer.apple.com/documentation/cfnetwork/cfnetworkerrors/kcferrorhttpparsefailure
来自 https://developer.apple.com/documentation/cfnetwork/cfnetworkerrors/kcferrorhttpparsefailure