Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix status code 4xx documentation to have the right descriptions #341

Merged
merged 1 commit into from
Feb 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions src/status_code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,38 +147,32 @@ pub enum StatusCode {
/// 400 Bad Request
///
/// The server could not understand the request due to invalid syntax.
BadRequest = 400,

/// 401 Unauthorized
///
/// Although the HTTP standard specifies "unauthorized", semantically this
/// response means "unauthenticated". That is, the client must
/// authenticate itself to get the requested response.
BadRequest = 400,
Unauthorized = 401,

/// 401 Unauthorized
/// 402 Payment Required
///
/// This response code is reserved for future use. The initial aim for
/// creating this code was using it for digital payment systems, however
/// this status code is used very rarely and no standard convention
/// exists.
Unauthorized = 401,
PaymentRequired = 402,

/// 402 Payment Required
/// 403 Forbidden
///
/// The client does not have access rights to the content; that is, it is
/// unauthorized, so the server is refusing to give the requested
/// resource. Unlike 401, the client's identity is known to the server.
PaymentRequired = 402,

/// 403 Forbidden
///
/// The server can not find requested resource. In the browser, this means
/// the URL is not recognized. In an API, this can also mean that the
/// endpoint is valid but the resource itself does not exist. Servers
/// may also send this response instead of 403 to hide the existence of
/// a resource from an unauthorized client. This response code is probably
/// the most famous one due to its frequent occurrence on the web.
Forbidden = 403,

/// 404 Not Found
///
/// The server can not find requested resource. In the browser, this means
/// the URL is not recognized. In an API, this can also mean that the
/// endpoint is valid but the resource itself does not exist. Servers
Expand Down