What is Http Status Code?

HTTP response status codes are three-digit numbers that are returned by web servers to indicate the outcome of a HTTP request made by a client (such as a web browser). These status codes help in understanding the nature of the response returned by the server. Responses are grouped: informational, successful(200s), redirects(300s), client errors(400s), and server errors(500s). The status codes are divided into 5 categories, based on the first digit of the code:

1xx: Informational – In short, it is an informational message, indicates that the server has received the request and is continuing to process it.
2xx: Success – It’s ok, indicates that the request was successfully received and accepted.
3xx: Redirection – The HTTP 3xx status codes indicate that the requested resource has been temporarily or permanently moved to a different location, and the client should take action to retrieve it from the new location.
4xx: Client error – indicates that the client made a bad request.
5xx: Server error – indicates that the server failed to fulfill a valid request, code or server error.

Some common HTTP status codes include:

200 OK: Request succeeded
400 Bad Request: The request was invalid.
401 Unauthorized: The requested authentication failed or user(client) does not have permissions for the access
404 Not Found: The requested resource could not be found on the server or deleted the request link on the server
500 Internal Server Error: A server-side error occurred while processing the request
HTTP status codes help developers to understand and troubleshoot issues that may arise during the communication between client and server.

Leave a Reply

Your email address will not be published. Required fields are marked *