Brief on HTTP Status codes

Introduction

HTTP (Hypertext Transfer Protocol) response codes are three-digit numbers that are returned by a server to indicate the status of a client’s request. Each response code provides information about the outcome of the request. Here’s an overview of some commonly encountered HTTP response codes:

1xx Informational

  • 100 Continue: The server has received the initial part of the request and asks the client to proceed with the rest.

2xx Success

  • 200 OK: The request was successful, and the server has returned the requested data.
  • 201 Created: The request was successful, and a new resource was created.
  • 204 No Content: The server successfully processed the request, but no content is returned.

3xx Redirection

  • 301 Moved Permanently: The requested resource has been permanently moved to a new location.
  • 302 Found: The requested resource is temporarily located at a different URL.
  • 304 Not Modified: The client’s cached version of the resource is still valid, and no new content is returned.

4xx Client Errors

  • 400 Bad Request: The server could not understand the request due to invalid syntax or missing parameters.
  • 401 Unauthorized: The request requires user authentication, and the provided credentials were invalid or missing.
  • 403 Forbidden: The server understood the request but refuses to authorize it due to insufficient permissions.
  • 404 Not Found: The server could not find the requested resource.

5xx Server Errors

  • 500 Internal Server Error: An unexpected error occurred on the server while processing the request.
  • 502 Bad Gateway: The server acting as a gateway or proxy received an invalid response from an upstream server.
  • 503 Service Unavailable: The server is currently unavailable, often due to being overloaded or undergoing maintenance.

These are just a few examples of HTTP response codes. There are many more codes available that provide specific information about different scenarios. It’s important to handle these response codes appropriately in your client or server code to handle different outcomes and provide meaningful feedback to users.

, , , , , ,

Related posts

Latest posts

Leave a Comment

Leave a Reply

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

Please disable your adblocker or whitelist this site!

How to whitelist website on AdBlocker?

How to whitelist website on AdBlocker?

  1. 1 Click on the AdBlock Plus icon on the top right corner of your browser
  2. 2 Click on "Enabled on this site" from the AdBlock Plus option
  3. 3 Refresh the page and start browsing the site