What HTTP Status Codes

What HTTP Status Codes

ยท

2 min read

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:

  1. 1xx (Informational): The request was received, and the server is continuing to process it.

  2. 2xx (Successful): The request was successfully received, understood, and accepted.

  3. 3xx (Redirection): Further action is required to complete the request.

  4. 4xx (Client Error): The request contains bad syntax or cannot be fulfilled by the server.

  5. 5xx (Server Error): The server failed to fulfill a valid request.

Some common HTTP status codes include:

  1. 200 OK: The request was successful

  2. 201 Created: The request was successful, and a resource was created

  3. 204 No Content: The request was successful, but there is no representation to return (i.e. the response is empty)

  4. 301 Moved Permanently: The requested resource has been permanently moved to a new URL.

  5. 302 Found (Previously "Moved temporarily"): The requested resource has temporarily been moved to a new URL.

  6. 400 Bad Request: The request could not be understood or was missing required parameters

  7. 401 Unauthorized: Authentication failed or user does not have permissions for the requested operation

  8. 403 Forbidden: Authentication succeeded, but the authenticated user does not have access to the requested resource

  9. 404 Not Found: The requested resource could not be found

  10. 500 Internal Server Error: An unexpected condition was encountered by the server.

  11. 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

Linkedin: https://www.linkedin.com/in/prahladinala/
Github: https://github.com/prahladinala/
Instagram: https://instagram.com/prahlad.inala/
Twitter: https://twitter.com/prahladinala
Figma Community: https://www.figma.com/@prahladinala
Dribbble: https://dribbble.com/prahladinala
Behance: https://www.behance.net/prahladinala
Personal Portfolio: https://prahladinala.in
ToolMate: https://toolmate.co.in

Thank you!

Did you find this article valuable?

Support Prahlad Inala by becoming a sponsor. Any amount is appreciated!

ย