Hypertext Transfer Protocol or HTTP for the most intimate is a set of rules for transferring data such as text files, images, audio, video and other multimedia files. When you type a website into your browser, it's behind the scenes sending a request HTTP requesting the desired page to some web server. Think of internet protocols as traffic rules, they are necessary for all cars (data) to reach their destination (customer). Learn more about HTTP .

The following is a list of HTTP response codes. The codes (codes) are used to inform the client side of the status (status) of their requests, in order to standardize and facilitate communication between them. The first digit of each status code indicates which of the five response classes it belongs to.

1XX – Informative

Indicates that the request was received and understood. This response is sent while request processing is still in progress. It serves to alert the customer that he can wait for a final response.

100ContinueIt means that the server received the request headers, and that the client must proceed to send the request body,
101change of protocolsIt means that the requester has asked the server to change protocols and the server is recognizing that it will do so.
102Processing It means that the server understood the request but that it will take time to process and will not have an immediate response, sending this status to prevent the user from waiting and exceeding the request time limit.

2XX – Success

This class of status codes indicates that the customer's request was successfully received, understood, accepted, and processed.

200OKThe request was accepted and the response sent.
201 CreatedThe request was accepted and a new resource was created.
202 AcceptedThe order has been accepted for processing, but processing has not yet been completed.
203Non-authoritative informationThe server successfully processed the request, but is returning information that could be from another source, for example, from a cache.
204No ContentThe server successfully processed the request, but there is no response.
205ResetPrompts the agent to reset the document that made the request.
206Partial ContentThe server is only delivering part of the resource due to an interval header sent by the client. This interval is often used to be able to resume interrupted downloads.

3XX – Redirection

The applicant must take additional steps to complete the application. This status code class indicates that the action still needs some action by the user. The required action can be performed by the agent, without user interaction, if and only if the method used in the second request is GET or HEAD. Usually 5 is the limit for redirects in this class, in order to avoid problems with infinite interactions between requests.

300Multiple choiceIndicates more options for the same resource. It can be used to present options for different formats of videos or images.
301Permanently MovedThis and all future requests must be directed to a new URI.
302FoundThis response code means that the URI of the requested resource has temporarily changed. Other URI changes may be made in the future. Therefore, this same URI must be used by the client in future requests.
303See OthersThe server sent this response to direct the client to get the requested resource in another URI with a GET request.
304not modifiedThis is used for caching purposes. It informs the client that the response has not been modified so that the client can continue to use the same cached version of the response.
307temporary redirectOn this occasion, the request must be repeated with another URI, but future requests can still use the original URI. In contrast to 303, the order method should not be changed when reissue of the original order. For example, a POST request must be repeated with another POST request.
308permanent redirectIndicates that the resource has been moved to a new permanent URI and all future requests must use one of the returned URIs. Codes 307 and 308 are similar to the behavior of codes 302 and 301, but do not allow the HTTP method to be modified.

4XX – Client Error

The 4XX class of status is intended to warn of a possible error in the user's request. The server must include a response that contains a possible explanation for the error, and whether it is a temporary or permanent situation.

400Invalid requestThe request could not be delivered due to some error in the user-side request.
401Not authorizedThe requested resource needs authentication and it was not provided.
403ProhibitedThe request is recognized by the server but the user is not allowed to access. Typically used for when the user is authenticated but does not have the necessary permission to access this resource.
404Not foundThe requested resource was not found.
405Method not allowedA request was made for a resource using a request method that is not supported, for example using GET on a resource that only accepts POST.
406Not acceptableThis response is sent when the web server, after performing server-based content negotiation, does not find any content that meets the criteria provided by the user agent.
407Proxy Authentication RequiredSimilar to 401, but authentication must be done through a proxy.
408Request Timed Out (Timeout)This response is sent over an idle connection by some servers, even without any prior request from the client. This means the server wants to terminate this unused connection.
409general conflictThis response is sent when a request conflicts with the current state of the server.
410Deleted (Gone)This response is sent when the requested content has been permanently deleted from the server, with no forwarding address.
411Required LengthThe server rejected the request because the Content-Length header field is not defined and the server requires it.
412Precondition FailedThe client has indicated preconditions in its headers that the server does not meet.
413very large requestThe request is larger than the server is willing or able to process.
414Request-URI Too LongThe URI requested by the client is longer than the server is willing to interpret.
415Unsupported Media TypeThe media format of the requested data is not supported by the server, so the server is rejecting the request.
416unsatisfactory rangeThe range specified by range in the header field in the request cannot be fulfilled. It is possible that the range is outside the data size of the destination URI.
417Expectation FailureThis response code means that the expectation indicated by the expect in the request header field cannot be serviced by the server.
418I am a teapotThis code was defined in 1998 as one of the traditional April 1st pranks, and is not expected to be implemented by real HTTP servers.
422Non-Processable EntityThe order was well formed but was unable to be followed due to semantic errors.
423ClosedThe resource being accessed is locked.
424dependency failureThe request failed due to the failure of a previous request (for example, a PROPPATCH).
425Too earlyIndicates that the server is not willing to take the risk of processing a replayable request.
426Mandatory UpdateThe server refuses to carry out the request using the current protocol, but may be willing to do so after the client upgrades to a different protocol.
429Excess ordersThe user has sent many requests in a certain period of time, used to limit the number of requests made by the user.

5XX – Other Errors

This category contains generic or unhandled server-side errors.

500Internal Server ErrorThe server received the request, but encountered an error that it didn't know how to handle.
501Not implementedThe server does not yet support the enabled functionality.
502Bad GatewayThis error response means that the server, while working as a gateway to get a response needed to handle the request, got an invalid response.
503Unavailable serviceThe server is under maintenance or is unable to handle resource processing due to system overload. This must be a temporary condition.
504Gateway Time-OutIt is characterized by errors particular to the website in question. It may be that the site is under maintenance or does not exist.
505HTTP Version not supportedThe HTTP version used in the request is not supported by the server.
0 0 votos
Nota do Artigo
Notify of

0 Comentários
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x