0001
0009 import Foundation
0010
0011 public enum HTTPStatusCode| Operation.swift:576 | let text = HTTPStatusCode(statusCode: code).statusDescription |
| StatusCode.swift:64 | self = HTTPStatusCode(rawValue: statusCode) ?? .UnknownStatus |
: Int {
0013 case Continue| StatusCode.swift:70 | case .Continue: |
= 100,
0014 SwitchingProtocols| StatusCode.swift:72 | case .SwitchingProtocols: |
= 101
0015
0016 case OK| StatusCode.swift:74 | case .OK: |
= 200,
0017 Created| StatusCode.swift:76 | case .Created: |
= 201,
0018 Accepted| StatusCode.swift:78 | case .Accepted: |
= 202,
0019 NonAuthoritativeInformation| StatusCode.swift:80 | case .NonAuthoritativeInformation: |
= 203,
0020 NoContent| StatusCode.swift:82 | case .NoContent: |
= 204,
0021 ResetContent| StatusCode.swift:84 | case .ResetContent: |
= 205,
0022 PartialContent| StatusCode.swift:86 | case .PartialContent: |
= 206
0023
0024 case MultipleChoices| StatusCode.swift:88 | case .MultipleChoices: |
= 300,
0025 MovedPermanently| StatusCode.swift:90 | case .MovedPermanently: |
= 301,
0026 Found| StatusCode.swift:92 | case .Found: |
= 302,
0027 SeeOther| StatusCode.swift:94 | case .SeeOther: |
= 303,
0028 NotModified| StatusCode.swift:96 | case .NotModified: |
= 304,
0029 UseProxy| StatusCode.swift:98 | case .UseProxy: |
= 305,
0030 Unused| StatusCode.swift:100 | case .Unused: |
= 306,
0031 TemporaryRedirect| StatusCode.swift:102 | case .TemporaryRedirect: |
= 307
0032
0033 case BadRequest| StatusCode.swift:104 | case .BadRequest: |
= 400,
0034 Unauthorized| StatusCode.swift:106 | case .Unauthorized: |
= 401,
0035 PaymentRequired| StatusCode.swift:108 | case .PaymentRequired: |
= 402,
0036 Forbidden| StatusCode.swift:110 | case .Forbidden: |
= 403,
0037 NotFound| StatusCode.swift:112 | case .NotFound: |
= 404,
0038 MethodNotAllowed| StatusCode.swift:114 | case .MethodNotAllowed: |
= 405,
0039 NotAcceptable| StatusCode.swift:116 | case .NotAcceptable: |
= 406,
0040 ProxyAuthenticationRequired| StatusCode.swift:118 | case .ProxyAuthenticationRequired: |
= 407,
0041 RequestTimeout| StatusCode.swift:120 | case .RequestTimeout: |
= 408,
0042 Conflict| StatusCode.swift:122 | case .Conflict: |
= 409,
0043 Gone| StatusCode.swift:124 | case .Gone: |
= 410,
0044 LengthRequired| StatusCode.swift:126 | case .LengthRequired: |
= 411,
0045 PreconditionFailed| StatusCode.swift:128 | case .PreconditionFailed: |
= 412,
0046 RequestEntityTooLarge| StatusCode.swift:130 | case .RequestEntityTooLarge: |
= 413,
0047 RequestUriTooLong| StatusCode.swift:132 | case .RequestUriTooLong: |
= 414,
0048 UnsupportedMediaType| StatusCode.swift:134 | case .UnsupportedMediaType: |
= 415,
0049 RequestedRangeNotSatisfiable| StatusCode.swift:136 | case .RequestedRangeNotSatisfiable: |
= 416,
0050 ExpectationFailed| StatusCode.swift:138 | case .ExpectationFailed: |
= 417
0051
0052 case InternalServerError| StatusCode.swift:140 | case .InternalServerError: |
= 500,
0053 NotImplemented| StatusCode.swift:142 | case .NotImplemented: |
= 501,
0054 BadGateway| StatusCode.swift:144 | case .BadGateway: |
= 502,
0055 ServiceUnavailable| StatusCode.swift:146 | case .ServiceUnavailable: |
= 503,
0056 GatewayTimeout| StatusCode.swift:148 | case .GatewayTimeout: |
= 504,
0057 HttpVersionNotSupported| StatusCode.swift:150 | case .HttpVersionNotSupported: |
= 505
0058
0059 case InvalidUrl| StatusCode.swift:152 | case .InvalidUrl: |
= -1001
0060
0061 case UnknownStatus| StatusCode.swift:64 | self = HTTPStatusCode(rawValue: statusCode) ?? .UnknownStatus |
= 0
0062
0063 init| Operation.swift:576 | let text = HTTPStatusCode(statusCode: code).statusDescription |
(statusCode: Int) {
0064 self = HTTPStatusCode(rawValue: statusCode) ?? .UnknownStatus
0065 }
0066
0067 public var statusDescription| Operation.swift:576 | let text = HTTPStatusCode(statusCode: code).statusDescription |
: String {
0068 get {
0069 switch self {
0070 case .Continue:
0071 return "Continue"
0072 case .SwitchingProtocols:
0073 return "Switching protocols"
0074 case .OK:
0075 return "OK"
0076 case .Created:
0077 return "Created"
0078 case .Accepted:
0079 return "Accepted"
0080 case .NonAuthoritativeInformation:
0081 return "Non authoritative information"
0082 case .NoContent:
0083 return "No content"
0084 case .ResetContent:
0085 return "Reset content"
0086 case .PartialContent:
0087 return "Partial Content"
0088 case .MultipleChoices:
0089 return "Multiple choices"
0090 case .MovedPermanently:
0091 return "Moved Permanently"
0092 case .Found:
0093 return "Found"
0094 case .SeeOther:
0095 return "See other Uri"
0096 case .NotModified:
0097 return "Not modified"
0098 case .UseProxy:
0099 return "Use proxy"
0100 case .Unused:
0101 return "Unused"
0102 case .TemporaryRedirect:
0103 return "Temporary redirect"
0104 case .BadRequest:
0105 return "Bad request"
0106 case .Unauthorized:
0107 return "Access denied"
0108 case .PaymentRequired:
0109 return "Payment required"
0110 case .Forbidden:
0111 return "Forbidden"
0112 case .NotFound:
0113 return "Page not found"
0114 case .MethodNotAllowed:
0115 return "Method not allowed"
0116 case .NotAcceptable:
0117 return "Not acceptable"
0118 case .ProxyAuthenticationRequired:
0119 return "Proxy authentication required"
0120 case .RequestTimeout:
0121 return "Request timeout"
0122 case .Conflict:
0123 return "Conflict request"
0124 case .Gone:
0125 return "Page is gone"
0126 case .LengthRequired:
0127 return "Lack content length"
0128 case .PreconditionFailed:
0129 return "Precondition failed"
0130 case .RequestEntityTooLarge:
0131 return "Request entity is too large"
0132 case .RequestUriTooLong:
0133 return "Request uri is too long"
0134 case .UnsupportedMediaType:
0135 return "Unsupported media type"
0136 case .RequestedRangeNotSatisfiable:
0137 return "Request range is not satisfiable"
0138 case .ExpectationFailed:
0139 return "Expected request is failed"
0140 case .InternalServerError:
0141 return "Internal server error"
0142 case .NotImplemented:
0143 return "Server does not implement a feature for request"
0144 case .BadGateway:
0145 return "Bad gateway"
0146 case .ServiceUnavailable:
0147 return "Service unavailable"
0148 case .GatewayTimeout:
0149 return "Gateway timeout"
0150 case .HttpVersionNotSupported:
0151 return "Http version not supported"
0152 case .InvalidUrl:
0153 return "Invalid url"
0154 default:
0155 return "Unknown status code"
0156 }
0157 }
0158 }
0159 }