Sobes.tech
Junior

What HTTP response codes do you know?

sobes.tech AI

Answer from AI

Informational:

  • 100 Continue - The server has received the initial part of the request and is waiting for the continuation.
  • 101 Switching Protocols - The server agrees to switch to the protocols specified in the Upgrade header.

Successful:

  • 200 OK - The request has been successfully processed.
  • 201 Created - The request has been successfully completed, and a new resource has been created as a result.
  • 204 No Content - The request has been successfully processed, but the response does not contain a entity (e.g., when deleting a resource).

Redirects:

  • 301 Moved Permanently - The requested resource has been permanently moved to a new URL.
  • 302 Found (formerly "Moved temporarily") - The requested resource is temporarily available at a different URL.
  • 304 Not Modified - The resource has not been modified since the last request. The browser can use the cached version.

Client errors:

  • 400 Bad Request - The server cannot process the request due to incorrect syntax.
  • 401 Unauthorized - The request requires authentication.
  • 403 Forbidden - Access to the resource is forbidden.
  • 404 Not Found - The requested resource was not found.
  • 405 Method Not Allowed - The HTTP method used in the request is not allowed for this resource.
  • 422 Unprocessable Entity - The server understands the content type of the request but cannot process the instructions contained (e.g., validation errors).

Server errors:

  • 500 Internal Server Error - The server encountered an unexpected condition.
  • 502 Bad Gateway - The server, acting as a gateway or proxy, received an invalid response from the upstream server.
  • 503 Service Unavailable - The server is temporarily unavailable (e.g., due to overload or maintenance).