Site icon TestingDocs.com

HTTP Status Codes

Overview

HTTP status codes are standard codes the server returns to the client as part of the server response after handling the client’s HTTP request to indicate the request’s outcome.

HTTP Status Codes

The codes are divided into the following categories:

 

200 (OK) – General success status code. The request was successful.
201 (Created)—The request has been fulfilled, resulting in the creation of a new resource. The resource was successfully created using either a POST or PUT request. Set the Location header to contain a link to the newly created resource. Response body content may or may not be present.
204 (No Content) – The server successfully processed the request but is not returning any content. (e.g. DELETE request).

301 (Moved Permanently) – The requested resource has been moved to a new URL permanently.
302 (Moved Temporarily)- The requested resource temporarily resides under a different URL.
304 (Not Modified) – Indicates that the resource has not been modified since the version specified by the request headers, so the server redirects to a cached version.

400 (Bad Request) – The server cannot process the request due to a client error, such as malformed syntax, validation errors, missing data, etc.
401 (Unauthorized) – Error code for a missing or invalid authentication token.
403 (Forbidden) – The server understood the request but refused to authorize it
Error code for the user not authorized to operate doesn’t have rights to access the resource, or the resource is unavailable for some reason (ACLs).404 (Not Found) – The requested resource is not at the provided URL.
Used when the requested resource is not found.
409 (Conflict)—Fulfilling the request causes a resource conflict. Duplicate entries and deleting root objects when cascade-delete is not supported are a couple of examples.

500 (Internal Server Error)—This is a generic error message indicating that something has gone wrong on the server. It is a general catch-all error when the server-side throws an exception.
502 (Bad Gateway) – The server received an invalid response from an upstream server while acting as a gateway or proxy.503 (Service Unavailable) – The server is currently unable to handle the request due to temporary overloading or maintenance of the server, or the server has rate limited the request.

Exit mobile version