http_type/http_status/type.rs
1/// Enumeration of HTTP status codes representing various HTTP response statuses
2///
3/// This enum includes common HTTP status codes that cover successful requests, client errors,
4/// and server errors. Each variant represents a specific HTTP status code.
5#[derive(Debug, Clone, PartialEq, Eq)]
6pub enum HttpStatus {
7 /// 100 Continue
8 Continue,
9 /// 101 Switching Protocols
10 SwitchingProtocols,
11 /// 102 Processing (WebDAV)
12 Processing,
13 /// 103 Early Hints
14 EarlyHints,
15 /// 200 OK
16 Ok,
17 /// 201 Created
18 Created,
19 /// 202 Accepted
20 Accepted,
21 /// 203 Non-Authoritative Information
22 NonAuthoritativeInformation,
23 /// 204 No Content
24 NoContent,
25 /// 205 Reset Content
26 ResetContent,
27 /// 206 Partial Content
28 PartialContent,
29 /// 207 Multi-Status (WebDAV)
30 MultiStatus,
31 /// 208 Already Reported (WebDAV)
32 AlreadyReported,
33 /// 226 IM Used
34 IMUsed,
35 /// 300 Multiple Choices
36 MultipleChoices,
37 /// 301 Moved Permanently
38 MovedPermanently,
39 /// 302 Found
40 Found,
41 /// 303 See Other
42 SeeOther,
43 /// 304 Not Modified
44 NotModified,
45 /// 305 Use Proxy
46 UseProxy,
47 /// 307 Temporary Redirect
48 TemporaryRedirect,
49 /// 308 Permanent Redirect
50 PermanentRedirect,
51 /// 400 Bad Request
52 BadRequest,
53 /// 401 Unauthorized
54 Unauthorized,
55 /// 402 Payment Required
56 PaymentRequired,
57 /// 403 Forbidden
58 Forbidden,
59 /// 404 Not Found
60 NotFound,
61 /// 405 Method Not Allowed
62 MethodNotAllowed,
63 /// 406 Not Acceptable
64 NotAcceptable,
65 /// 407 Proxy Authentication Required
66 ProxyAuthenticationRequired,
67 /// 408 Request Timeout
68 RequestTimeout,
69 /// 409 Conflict
70 Conflict,
71 /// 410 Gone
72 Gone,
73 /// 411 Length Required
74 LengthRequired,
75 /// 412 Precondition Failed
76 PreconditionFailed,
77 /// 413 Payload Too Large
78 PayloadTooLarge,
79 /// 414 URI Too Long
80 URITooLong,
81 /// 415 Unsupported Media Type
82 UnsupportedMediaType,
83 /// 416 Range Not Satisfiable
84 RangeNotSatisfiable,
85 /// 417 Expectation Failed
86 ExpectationFailed,
87 /// 418 I'm a teapot
88 ImATeapot,
89 /// 421 Misdirected Request
90 MisdirectedRequest,
91 /// 422 Unprocessable Entity (WebDAV)
92 UnprocessableEntity,
93 /// 423 Locked (WebDAV)
94 Locked,
95 /// 424 Failed Dependency (WebDAV)
96 FailedDependency,
97 /// 425 Too Early
98 TooEarly,
99 /// 426 Upgrade Required
100 UpgradeRequired,
101 /// 428 Precondition Required
102 PreconditionRequired,
103 /// 429 Too Many Requests
104 TooManyRequests,
105 /// 431 Request Header Fields Too Large
106 RequestHeaderFieldsTooLarge,
107 /// 451 Unavailable For Legal Reasons
108 UnavailableForLegalReasons,
109 /// 500 Internal Server Error
110 InternalServerError,
111 /// 501 Not Implemented
112 NotImplemented,
113 /// 502 Bad Gateway
114 BadGateway,
115 /// 503 Service Unavailable
116 ServiceUnavailable,
117 /// 504 Gateway Timeout
118 GatewayTimeout,
119 /// 505 HTTP Version Not Supported
120 HTTPVersionNotSupported,
121 /// 506 Variant Also Negotiates
122 VariantAlsoNegotiates,
123 /// 507 Insufficient Storage (WebDAV)
124 InsufficientStorage,
125 /// 508 Loop Detected (WebDAV)
126 LoopDetected,
127 /// 510 Not Extended
128 NotExtended,
129 /// 511 Network Authentication Required
130 NetworkAuthenticationRequired,
131 /// Unknown status code
132 Unknown,
133}