@@ -149,38 +149,32 @@ pub enum StatusCode {
149
149
/// 400 Bad Request
150
150
///
151
151
/// The server could not understand the request due to invalid syntax.
152
+ BadRequest = 400 ,
153
+
154
+ /// 401 Unauthorized
152
155
///
153
156
/// Although the HTTP standard specifies "unauthorized", semantically this
154
157
/// response means "unauthenticated". That is, the client must
155
158
/// authenticate itself to get the requested response.
156
- BadRequest = 400 ,
159
+ Unauthorized = 401 ,
157
160
158
- /// 401 Unauthorized
161
+ /// 402 Payment Required
159
162
///
160
163
/// This response code is reserved for future use. The initial aim for
161
164
/// creating this code was using it for digital payment systems, however
162
165
/// this status code is used very rarely and no standard convention
163
166
/// exists.
164
- Unauthorized = 401 ,
167
+ PaymentRequired = 402 ,
165
168
166
- /// 402 Payment Required
169
+ /// 403 Forbidden
167
170
///
168
171
/// The client does not have access rights to the content; that is, it is
169
172
/// unauthorized, so the server is refusing to give the requested
170
173
/// resource. Unlike 401, the client's identity is known to the server.
171
- PaymentRequired = 402 ,
172
-
173
- /// 403 Forbidden
174
- ///
175
- /// The server can not find requested resource. In the browser, this means
176
- /// the URL is not recognized. In an API, this can also mean that the
177
- /// endpoint is valid but the resource itself does not exist. Servers
178
- /// may also send this response instead of 403 to hide the existence of
179
- /// a resource from an unauthorized client. This response code is probably
180
- /// the most famous one due to its frequent occurrence on the web.
181
174
Forbidden = 403 ,
182
175
183
176
/// 404 Not Found
177
+ ///
184
178
/// The server can not find requested resource. In the browser, this means
185
179
/// the URL is not recognized. In an API, this can also mean that the
186
180
/// endpoint is valid but the resource itself does not exist. Servers
0 commit comments