HTTP Status Codes - yibinericxia/documents GitHub Wiki

1xx: informational request

  • 100: Continue (everything so far is OK and the client should continue with the request or ignore if if finished)
  • 101: Switching Protocols (for example upgraded to websocket specified in the request header, as well as in the response header)

2xx: successful request

  • 200: OK

  • 201: Created (for POST method which has created resource successfully)

  • 202: Accepted (return with information to check the status of asynchronous task/batch processing)

  • 204: No Content (the server has fulfilled the request successfully with no entity returned)

3xx: redirect

  • 301: Moved Permanently (for GET / HEAD permanent redirect)

  • 302: Found (temporary redirect by server to prevent search engine from updating the address, good for the method GET/HEAD)

  • 304: Not modified (may need to clear the browser/DNS cache data, or disable browser extensions)

  • 307: Temporary Redirect (by browser to preserve the method like POST)

4xx: client error

  • 400: Bad Request

  • 401: Unauthorized (for invalid user credentials)

  • 403: Forbidden (for user lack of privileges to access the resource)

  • 404: Not Found (for non-existing resource, or no permission to resource for security)

  • 405: Method Not Allowed (the method is not supported although the server knows the request, such as PUT instead of POST)

  • 406: Not Acceptable (for request with unsupported content negotiation defined in header of Accept, Accept-Encoding or Accept-Language)

  • 408: Request Timeout (it indicates network latency due to slow-connection/heavy-traffic at client side or server being too busy with misconfiguration at server side)

  • 409: Conflict (for a conflict in the request with the current state of the resource)

  • 413: Request Entity Too Large (when payload size exceeds the server file size limit)

  • 415: Unsupported Media Type (for request with unsupported format defined in header of Content-Type or Content-Encoding)

  • 417: Expectation Failed (for the server cannot meet the expectation set in HTTP request header Expect, for example, Expect: 100-continue with too large file)

  • 422: Unprocessable Entity (the server understands the content type (see 415), and the syntax of the request entity (see 400), but was unable to process the contained body)

  • 499: Client Closed Request (the connection closed by the client, such as browser or proxy, before the server delivers response, might due to client side timeout)

5xx: server error

  • 500: Internal Server Error

  • 502: Bad Gateway

  • 503: Service Unavailable (server might be down or overloaded)

  • 504: Gateway Timeout (it indicates the gateway/proxy did not receive timely response due to heavy traffic from upstream server thus could not complete the request)

Reference

  1. https://www.rfc-editor.org/rfc/rfc7231