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