HTTP Status Code

Every HTTP response comes with a status code holds information about how the request was processed.

Status code expressed through 3-digits number

  • 1XX Informational response request received and understood.
  • 2XX Successful response request received , understood and accepted.
  • 3XX Redirection indicates that a client must take additional action to complete the request.
  • 4XX Indicates for client error.
  • 5XX Server error indicates that error happened on the server.

Informational Response

100 => Continue server has received the request headers and the client should proceed to send the request body.

101 => Switching protocols client asked the server to switch protocols and the server has agreed to do so

Successful Response

200 => OK successful HTTP response

201 => Created response for post request has been completed and new resource has been created.

202 => Accepted request has been accepted for processing.

203 => Non-Authoritative Information original server returned a 200, and a transforming proxy between the client and the server changed the payload.

204 => No Content server successfully processed the request, but is not returning any content.

205 => Reset Content server successfully processed the request, but is not returning any content. Similar to a 204 response, but the server requires that the client resets the document view (used to clear forms, for example)

206 => Partial Content In response to arrange request coming from the client, the server sends a partial content response.

Redirection

301 => Moved Permanently This and all future requests should be directed to the given URI. Only use with GET/HEAD requests, and 308 Permanent Redirect for all the other methods.

302 =>Found The resource is temporarily moved to a URL specified by the Location header. Only use with GET/HEAD requests, and 307 Temporary Redirect for all the other methods.

303 => See Other After a POST or PUT request, points to the confirmation message in the Location header, accessible using a new GET request.

304 => Not Modified When the client uses the request headers If-Modified-Since or If-None-Match, this response status code indicates that the resource has not been modified.

307 => Temporary Redirect Similar to the 302 request, except it does not allow changing the HTTP method 308 Permanent Redirect Similar to the 301 request, except it does not allow changing the HTTP method.

Client errors

400 => Bad Request Due to a request error that was generated on the client, the server cannot process the request. Errors can include a malformed request, size too large to be handled, or others.

401 => Unauthorized Sent when authentication is required and the client is not authorized .

403 => Forbidden The resource is not available for various reasons. If the reason is authentication, prefer the 401 Unauthorized status code.

404 => Not Found The requested resource could not be found.

405 => Method Not Allowed The resource is not available through that HTTP method, but might be with another.

406 => Not Acceptable The client passed an Accept header with values that are not compatible with the server.

407 => Proxy Authentication Required Between the client and the server there is a proxy that requires authentication.

408 => Request Timeout The server timed out waiting for the request.

Server errors

500 => Internal Server Error A generic server error message, given when an unexpected condition was encountered and no more specific message is suitable.

501 => Not Implemented The server either does not recognize the request method, or it lacks the ability to fulfill the request.

502 => Bad Gateway The server was acting as a gateway or proxy and received an invalid response from the upstream server.

503 => Service Unavailable The server is currently temporarily unavailable (because it is overloaded or down for maintenance).

504 => Gateway Timeout The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.

505 => HTTP Version Not Supported The server does not support the HTTP protocol version specified in the request.