-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStatusCode.swift
More file actions
74 lines (73 loc) · 1.98 KB
/
StatusCode.swift
File metadata and controls
74 lines (73 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import Foundation
public extension HTTP {
/// An enumeration of the status codes
enum StatusCode: Int, Sendable {
// 1xx
case `continue` = 100
case switchingProtocols
case processing
// 2xx
case ok = 200
case created
case accepted
case nonAuthoritativeInformation
case noContent
case resetContent
case partialContent
case multiStatus
case alreadyReported
case iMUsed = 226
// 3xx
case multipleChoices = 300
case movedPermanently
case found
case seeOther
case notModified
case useProxy
case switchProxy
case temporaryRedirect
case permanentRedirect
// 4xx
case badRequest = 400
case unauthorized
case paymentRequired
case forbidden
case notFound
case methodNotAllowed
case notAcceptable
case proxyAuthenticationRequired
case requestTimeout
case conflict
case gone
case lengthRequired
case preconditionFailed
case payloadTooLarge
case uriTooLong
case unsupportedMediaType
case rangeNotSatisfiable
case expectationFailed
case imATeapot
case misdirectedRequest = 421
case unprocessableEntity
case locked
case failedDependency
case upgradeRequired = 426
case preconditionRequired = 428
case tooManyRequests
case requestHeaderFieldsTooLarge = 431
case unavailableForLegalReasons = 451
// 5xx
case internalServerError = 500
case notImplemented
case badGateway
case serviceUnavailable
case gatewayTimeout
case httpVersionNotSupported
case variantAlsoNegotiates
case insufficientStorage
case loopDetected
case notExtended = 510
case networkAuthenticationRequired
case unknown = -1
}
}