HTTP status codes are three-digit codes returned by a server to indicate the status of a client's request. They are used to communicate the success or failure of an HTTP request.
The first digit of an HTTP status code represents the general class of the response, with the most common being:
1xx (Informational): The request was received, and the server is continuing to process it.
2xx (Successful): The request was successfully received, understood, and accepted.
3xx (Redirection): Further action is required to complete the request.
4xx (Client Error): The request contains bad syntax or cannot be fulfilled by the server.
5xx (Server Error): The server failed to fulfill a valid request.
Some common HTTP status codes include:
200 OK: The request was successful
201 Created: The request was successful, and a resource was created
204 No Content: The request was successful, but there is no representation to return (i.e. the response is empty)
301 Moved Permanently: The requested resource has been permanently moved to a new URL.
302 Found (Previously "Moved temporarily"): The requested resource has temporarily been moved to a new URL.
400 Bad Request: The request could not be understood or was missing required parameters
401 Unauthorized: Authentication failed or user does not have permissions for the requested operation
403 Forbidden: Authentication succeeded, but the authenticated user does not have access to the requested resource
404 Not Found: The requested resource could not be found
500 Internal Server Error: An unexpected condition was encountered by the server.
503 Service Unavailable: The server is currently unavailable (e.g., due to maintenance).
HTTP status codes play a crucial role in the functioning of the web and help ensure that clients and servers can effectively communicate.
Follow for more
Figma Community: https://www.figma.com/@prahladinala
Personal Portfolio: https://prahladinala.in