ios - 具有等效 HTTP 状态代码的所有 NSURLErrorDomain 错误是什么?

标签 ios cocoa http-status-codes foundation nserror

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/

相关文章:

ios - XCode 警告 : "/* within block comment"

objective-c - NSTextField 无法全屏工作

objective-c - Objective-C 中的变量作用域

scala - databinder 调度无法正确处理 HTTP 302 和身份验证

php - 如何检查网页是否存在。 jQuery 和/或 PHP

ios - 带有 appendPartWithFileData 的多个文件

ios - 如何根据设备屏幕 objective-c 设置 UITableViewCell 高度

ios - UITableviewCell 不清理数据?

线程中的 Swift 3 CFRunLoopRun?

http - 根据我们域中定义的规则,Http 状态代码 412 是否适合错误