You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* \copyright Licensed under Creative Commons CC0 (http://creativecommons.org/publicdomain/zero/1.0/)
10
10
*/
@@ -19,6 +19,7 @@
19
19
namespaceHttpStatus
20
20
{
21
21
22
+
22
23
/*! Enum for the HTTP status codes.
23
24
*/
24
25
enum Code
@@ -78,15 +79,19 @@ enum Code
78
79
Gone = 410, //!< Indicates that access to the target resource is no longer available at the origin server and that this condition is likely to be permanent.
79
80
LengthRequired = 411, //!< Indicates that the server refuses to accept the request without a defined Content-Length.
80
81
PreconditionFailed = 412, //!< Indicates that one or more preconditions given in the request header fields evaluated to false when tested on the server.
81
-
PayloadTooLarge = 413, //!< Indicates that the server is refusing to process a request because the request payload is larger than the server is willing or able to process.
82
+
ContentTooLarge = 413, //!< Indicates that the server is refusing to process a request because the request payload is larger than the server is willing or able to process.
83
+
PayloadTooLarge = 413, //!< Alias for ContentTooLarge for backward compatibility.
82
84
URITooLong = 414, //!< Indicates that the server is refusing to service the request because the request-target is longer than the server is willing to interpret.
83
85
UnsupportedMediaType = 415, //!< Indicates that the origin server is refusing to service the request because the payload is in a format not supported by the target resource for this method.
84
86
RangeNotSatisfiable = 416, //!< Indicates that none of the ranges in the request's Range header field overlap the current extent of the selected resource or that the set of ranges requested has been rejected due to invalid ranges or an excessive request of small or overlapping ranges.
85
87
ExpectationFailed = 417, //!< Indicates that the expectation given in the request's Expect header field could not be met by at least one of the inbound servers.
86
88
ImATeapot = 418, //!< Any attempt to brew coffee with a teapot should result in the error code 418 I'm a teapot.
87
-
UnprocessableEntity = 422, //!< Means the server understands the content type of the request entity (hence a 415(Unsupported Media Type) status code is inappropriate), and the syntax of the request entity is correct (thus a 400 (Bad Request) status code is inappropriate) but was unable to process the contained instructions.
89
+
MisdirectedRequest = 421, //!< Indicates that the request was directed at a server that is unable or unwilling to produce an authoritative response for the target URI.
90
+
UnprocessableContent = 422, //!< Means the server understands the content type of the request entity (hence a 415(Unsupported Media Type) status code is inappropriate), and the syntax of the request entity is correct (thus a 400 (Bad Request) status code is inappropriate) but was unable to process the contained instructions.
91
+
UnprocessableEntity = 422, //!< Alias for UnprocessableContent for backward compatibility.
88
92
Locked = 423, //!< Means the source or destination resource of a method is locked.
89
93
FailedDependency = 424, //!< Means that the method could not be performed on the resource because the requested action depended on another action and that action failed.
94
+
TooEarly = 425, //!< Indicates that the server is unwilling to risk processing a request that might be replayed.
90
95
UpgradeRequired = 426, //!< Indicates that the server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol.
91
96
PreconditionRequired = 428, //!< Indicates that the origin server requires the request to be conditional.
92
97
TooManyRequests = 429, //!< Indicates that the user has sent too many requests in a given amount of time (\"rate limiting\").
* \copyright Licensed under Creative Commons CC0 (http://creativecommons.org/publicdomain/zero/1.0/)
10
10
*/
@@ -79,15 +79,19 @@ enum class Code
79
79
Gone = 410, //!< Indicates that access to the target resource is no longer available at the origin server and that this condition is likely to be permanent.
80
80
LengthRequired = 411, //!< Indicates that the server refuses to accept the request without a defined Content-Length.
81
81
PreconditionFailed = 412, //!< Indicates that one or more preconditions given in the request header fields evaluated to false when tested on the server.
82
-
PayloadTooLarge = 413, //!< Indicates that the server is refusing to process a request because the request payload is larger than the server is willing or able to process.
82
+
ContentTooLarge = 413, //!< Indicates that the server is refusing to process a request because the request payload is larger than the server is willing or able to process.
83
+
PayloadTooLarge = 413, //!< Alias for ContentTooLarge for backward compatibility.
83
84
URITooLong = 414, //!< Indicates that the server is refusing to service the request because the request-target is longer than the server is willing to interpret.
84
85
UnsupportedMediaType = 415, //!< Indicates that the origin server is refusing to service the request because the payload is in a format not supported by the target resource for this method.
85
86
RangeNotSatisfiable = 416, //!< Indicates that none of the ranges in the request's Range header field overlap the current extent of the selected resource or that the set of ranges requested has been rejected due to invalid ranges or an excessive request of small or overlapping ranges.
86
87
ExpectationFailed = 417, //!< Indicates that the expectation given in the request's Expect header field could not be met by at least one of the inbound servers.
87
88
ImATeapot = 418, //!< Any attempt to brew coffee with a teapot should result in the error code 418 I'm a teapot.
88
-
UnprocessableEntity = 422, //!< Means the server understands the content type of the request entity (hence a 415(Unsupported Media Type) status code is inappropriate), and the syntax of the request entity is correct (thus a 400 (Bad Request) status code is inappropriate) but was unable to process the contained instructions.
89
+
MisdirectedRequest = 421, //!< Indicates that the request was directed at a server that is unable or unwilling to produce an authoritative response for the target URI.
90
+
UnprocessableContent = 422, //!< Means the server understands the content type of the request entity (hence a 415(Unsupported Media Type) status code is inappropriate), and the syntax of the request entity is correct (thus a 400 (Bad Request) status code is inappropriate) but was unable to process the contained instructions.
91
+
UnprocessableEntity = 422, //!< Alias for UnprocessableContent for backward compatibility.
89
92
Locked = 423, //!< Means the source or destination resource of a method is locked.
90
93
FailedDependency = 424, //!< Means that the method could not be performed on the resource because the requested action depended on another action and that action failed.
94
+
TooEarly = 425, //!< Indicates that the server is unwilling to risk processing a request that might be replayed.
91
95
UpgradeRequired = 426, //!< Indicates that the server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol.
92
96
PreconditionRequired = 428, //!< Indicates that the origin server requires the request to be conditional.
93
97
TooManyRequests = 429, //!< Indicates that the user has sent too many requests in a given amount of time (\"rate limiting\").
@@ -109,6 +113,8 @@ enum class Code
109
113
LoopDetected = 508, //!< Indicates that the server terminated an operation because it encountered an infinite loop while processing a request with "Depth: infinity". [RFC 5842]
110
114
NotExtended = 510, //!< The policy for accessing the resource has not been met in the request. [RFC 2774]
111
115
NetworkAuthenticationRequired = 511, //!< Indicates that the client needs to authenticate to gain network access.
116
+
117
+
xxx_max = 1023
112
118
};
113
119
114
120
/*! Converts a Code to its corresponding integer value.
0 commit comments