Member-only story

What is a Status Code?

habtesoft
3 min readNov 16, 2024

--

A status code is a standard code used in HTTP (HyperText Transfer Protocol) responses to indicate the result of a client’s request to the server. When you make a request to a server (e.g., loading a webpage), the server responds with a status code along with the requested content (like HTML, JSON, etc.). The status code informs the client about the outcome of the request, whether it was successful, whether there was an error, or if further action is needed.

Not a Medium member? Read this article here

Structure of a Status Code

An HTTP status code is a three-digit number, and it’s grouped into five classes based on the first digit:

  1. 1xx (Informational): The request was received, and the process is continuing.
  • Example: 100 Continue (The server has received the request headers, and the client should proceed with the request body).

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

  • Example: 200 OK (The request was successful, and the response contains the requested data).

3. 3xx (Redirection): Further action is required to fulfill the request, typically involving URL redirection.

  • Example: 301 Moved Permanently (The resource has…

--

--

habtesoft
habtesoft

Written by habtesoft

Passionate JavaScript developer with a focus on backend technologies. Always eager to connect and learn. Let’s talk, https://buymeacoffee.com/habtesoftat

No responses yet