Enum irox_networking::http::HttpCodes
source · #[non_exhaustive]pub enum HttpCodes {
Show 64 variants
Info_100_Continue,
Info_101_SwitchingProtocols,
Info_102_Processing,
Info_103_EarlyHints,
Success_200_Ok,
Success_201_Created,
Success_202_Accepted,
Success_203_NotAuthoritative,
Success_204_NoContent,
Success_205_ResetContent,
Success_206_PartialContent,
Success_207_MultiStatus,
Success_208_AlreadyReported,
Success_226_IMUsed,
Redirect_300_MultipleChoices,
Redirect_301_MovedPermanently,
Redirect_302_Found,
Redirect_303_SeeOther,
Redirect_304_NotModified,
Redirect_305_UseProxy,
Redirect_306_Unused,
Redirect_307_Temporary,
Redirect_308_PermanentRedirect,
ClientError_400_BadRequest,
ClientError_401_Unauthorized,
ClientError_402_PaymentRequired,
ClientError_403_Forbidden,
ClientError_404_NotFound,
ClientError_405_MethodNotAllowed,
ClientError_406_NotAcceptable,
ClientError_407_ProxyAuthenticationRequired,
ClientError_408_RequestTimeout,
ClientError_409_Conflict,
ClientError_410_Gone,
ClientError_411_LengthRequired,
ClientError_412_PreconditionFailed,
ClientError_413_PayloadTooLarge,
ClientError_414_URITooLong,
ClientError_415_UnsupportedMediaType,
ClientError_416_RangeNotSatisfiable,
ClientError_417_ExpectationFailed,
ClientError_418_ImATeapot,
ClientError_421_MisdirectedRequest,
ClientError_422_UnprocessableContent,
ClientError_423_Locked,
ClientError_424_FailedDependency,
ClientError_425_TooEarly,
ClientError_426_UpgradeRequired,
ClientError_428_PreconditionRequired,
ClientError_429_TooManyRequests,
ClientError_431_RequestHeaderFieldsTooLarge,
ClientError_451_UnavailableForLegalReasons,
ServerError_500_InternalServerError,
ServerError_501_NotImplemented,
ServerError_502_BadGateway,
ServerError_503_ServiceUnavailable,
ServerError_504_GatewayTimeout,
ServerError_505_HTTPVersionNotSupported,
ServerError_506_VariantAlsoNegotiates,
ServerError_507_InsufficientStorage,
ServerError_508_LoopDetected,
ServerError_510_NotExtended,
ServerError_511_NetworkAuthenticationRequired,
UnknownOther(u16),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Info_100_Continue
This interim response indicates that the client should continue the request or ignore the response if the request is already finished.
Info_101_SwitchingProtocols
This code is sent in response to an Upgrade request header from the client and indicates the protocol the server is switching to.
Info_102_Processing
This code indicates that the server has received and is processing the request, but no response is available yet.
Info_103_EarlyHints
This status code is primarily intended to be used with the Link header, letting the user agent start preloading resources while the server prepares a response or preconnect to an origin from which the page will need resources.
Success_200_Ok
The request succeeded
Success_201_Created
The request succeeded, and a new resource was created as a result.
Success_202_Accepted
The request has been received but not yet acted upon
Success_203_NotAuthoritative
This response code means the returned metadata is not exactly the same as is available from the origin server, but is collected from a local or a third-party copy.
Success_204_NoContent
There is no content to send for this request, but the headers may be useful
Success_205_ResetContent
Tells the user agent to reset the document which sent this request.
Success_206_PartialContent
This response code is used when the Range header is sent from the client to request only part of a resource.
Success_207_MultiStatus
Conveys information about multiple resources, for situations where multiple status codes might be appropriate.
Success_208_AlreadyReported
Used inside a <dav:propstat> response element to avoid repeatedly enumerating the internal
members of multiple bindings to the same collection.
Success_226_IMUsed
The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.
Redirect_300_MultipleChoices
The request has more than one possible response
Redirect_301_MovedPermanently
The URL of the requested resource has been changed permanently
Redirect_302_Found
This response code means that the URI of requested resource has been changed temporarily
Redirect_303_SeeOther
The server sent this response to direct the client to get the requested resource at another URI with a GET request.
Redirect_304_NotModified
This is used for caching purposes. It tells the client that the response has not been modified
Redirect_305_UseProxy
Defined in a previous version of the HTTP specification to indicate that a requested response must be accessed by a proxy
Redirect_306_Unused
This response code is no longer used; it is just reserved
Redirect_307_Temporary
The server sends this response to direct the client to get the requested resource at another URI with the same method that was used in the prior request
Redirect_308_PermanentRedirect
This means that the resource is now permanently located at another URI, specified by the Location: HTTP Response header.
ClientError_400_BadRequest
The server cannot or will not process the request due to something that is perceived to be a client error
Although the HTTP standard specifies “unauthorized”, semantically this response means “unauthenticated”.
ClientError_402_PaymentRequired
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.
ClientError_403_Forbidden
The client does not have access rights to the content
ClientError_404_NotFound
The server cannot find the requested resource
ClientError_405_MethodNotAllowed
The request method is known by the server but is not supported by the target resource
ClientError_406_NotAcceptable
This response is sent when the web server, after performing server-driven content negotiation, doesn’t find any content that conforms to the criteria given by the user agent
ClientError_407_ProxyAuthenticationRequired
This is similar to 401 Unauthorized but authentication is needed to be done by a proxy.
ClientError_408_RequestTimeout
This response is sent on an idle connection by some servers, even without any previous request by the client. It means that the server would like to shut down this unused connection.
ClientError_409_Conflict
This response is sent when a request conflicts with the current state of the server.
ClientError_410_Gone
This response is sent when the requested content has been permanently deleted from server, with no forwarding address
ClientError_411_LengthRequired
Server rejected the request because the Content-Length header field is not defined and the server requires it.
ClientError_412_PreconditionFailed
The client has indicated preconditions in its headers which the server does not meet.
ClientError_413_PayloadTooLarge
Request entity is larger than limits defined by server
ClientError_414_URITooLong
The URI requested by the client is longer than the server is willing to interpret.
ClientError_415_UnsupportedMediaType
The media format of the requested data is not supported by the server, so the server is rejecting the request.
ClientError_416_RangeNotSatisfiable
The range specified by the Range header field in the request cannot be fulfilled
ClientError_417_ExpectationFailed
This response code means the expectation indicated by the Expect request header field cannot be met by the server.
ClientError_418_ImATeapot
The server refuses the attempt to brew coffee with a teapot.
ClientError_421_MisdirectedRequest
The request was directed at a server that is not able to produce a response
ClientError_422_UnprocessableContent
The request was well-formed but was unable to be followed due to semantic errors.
ClientError_423_Locked
The resource that is being accessed is locked.
ClientError_424_FailedDependency
The request failed due to failure of a previous request.
ClientError_425_TooEarly
Indicates that the server is unwilling to risk processing a request that might be replayed.
ClientError_426_UpgradeRequired
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
ClientError_428_PreconditionRequired
The origin server requires the request to be conditional. This response is intended to prevent the ‘lost update’ problem, where a client GETs a resource’s state, modifies it and PUTs it back to the server, when meanwhile a third party has modified the state on the server, leading to a conflict.
ClientError_429_TooManyRequests
The user has sent too many requests in a given amount of time (“rate limiting”).
ClientError_431_RequestHeaderFieldsTooLarge
The server is unwilling to process the request because its header fields are too large
The user agent requested a resource that cannot legally be provided, such as a web page censored by a government.
ServerError_500_InternalServerError
The server has encountered a situation it does not know how to handle
ServerError_501_NotImplemented
The request method is not supported by the server and cannot be handled. The only methods
that servers are required to support (and therefore that must not return this code) are
GET and HEAD
ServerError_502_BadGateway
This error response means that the server, while working as a gateway to get a response needed to handle the request, got an invalid response.
The server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded
ServerError_504_GatewayTimeout
This error response is given when the server is acting as a gateway and cannot get a response in time
ServerError_505_HTTPVersionNotSupported
The HTTP version used in the request is not supported by the server.
ServerError_506_VariantAlsoNegotiates
The server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process
ServerError_507_InsufficientStorage
The method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request
ServerError_508_LoopDetected
The server detected an infinite loop while processing the request
ServerError_510_NotExtended
Further extensions to the request are required for the server to fulfill it
ServerError_511_NetworkAuthenticationRequired
Indicates that the client needs to authenticate to gain network access
UnknownOther(u16)
Unknown/other code
Implementations§
Trait Implementations§
source§impl Ord for HttpCodes
impl Ord for HttpCodes
source§impl PartialEq for HttpCodes
impl PartialEq for HttpCodes
source§impl PartialOrd for HttpCodes
impl PartialOrd for HttpCodes
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read more