Sobes.tech
Middle

What HTTP response codes do you know?

sobes.tech AI

Answer from AI

Main HTTP response codes are divided into several groups:

  • 1xx (Informational):

    • 100 Continue — the server has received the initial part of the request, and the client can continue.
  • 2xx (Successful):

    • 200 OK — the request was successfully processed.
    • 201 Created — the resource was successfully created.
    • 204 No Content — the request was processed, but there is no response body.
  • 3xx (Redirection):

    • 301 Moved Permanently — the resource has been permanently moved.
    • 302 Found — temporary redirection.
    • 304 Not Modified — the resource has not changed, use cache.
  • 4xx (Client errors):

    • 400 Bad Request — invalid request.
    • 401 Unauthorized — authentication is required.
    • 403 Forbidden — access is denied.
    • 404 Not Found — resource not found.
    • 429 Too Many Requests — too many requests.
  • 5xx (Server errors):

    • 500 Internal Server Error — internal server error.
    • 502 Bad Gateway — incorrect response from upstream server.
    • 503 Service Unavailable — service is unavailable.

Knowing these codes is important for proper handling of responses on the frontend, for example, to display messages to the user or to retry requests.