在 NSURLErrorDomain errors 的文档中NSURLErrorBadServerResponse 的描述如下:
Returned when the URL Loading system receives bad data from the server.
This is equivalent to the “500 Server Error” message sent by HTTP servers.
是否有其他具有等效 HTTP 状态代码的 NSURLErrorDomain 错误?比如NSURLErrorTimedOut是否等同于408 Request Timeout?
最佳答案
这些值在 NSURLError.h 中定义。如果您键入 NSURLErrorDomain
在你的 Mac 上进入 Spotlight 搜索,它会在某处找到相应的文件,在我的例子中是在 /Library/Developer/../SDKs/..
中.
更新了 Apple 开发者网站上加载系统错误代码的 URL:https://developer.apple.com/documentation/foundation/1508628-url_loading_system_error_codes?language=occ
关于ios - 具有等效 HTTP 状态代码的所有 NSURLErrorDomain 错误是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34113453/