Sobes.tech
Middle

What HTTP response codes do you know? How can they be grouped?

sobes.tech AI

Answer from AI

HTTP status codes are divided into five main groups based on the first digit of the code:

1xx — Informational (e.g., 100 Continue) 2xx — Success (200 OK, 201 Created) 3xx — Redirection (301 Moved Permanently, 302 Found) 4xx — Client errors (400 Bad Request, 401 Unauthorized, 404 Not Found) 5xx — Server errors (500 Internal Server Error, 503 Service Unavailable)

Examples of popular codes:

  • 200 OK — request successfully processed
  • 201 Created — resource successfully created
  • 400 Bad Request — invalid request
  • 401 Unauthorized — authentication required
  • 403 Forbidden — access denied
  • 404 Not Found — resource not found
  • 500 Internal Server Error — internal server error
  • 503 Service Unavailable — service temporarily unavailable

This division helps quickly understand the result of the request and handle the response correctly.