BRAHMA TECHNOLAB

The Ultimate Guide to HTTP Status Codes

HTTP Status Codes

  • HTTP response codes are three-digit numbers that provide information about the status of a request made to a web server. They help to indicate whether the request was successful, and if not, why not.
  • The Internet Assigned Numbers Authority (IANA) is the organization responsible for maintaining the registry of HTTP response codes. They define the codes and ensure that they are used consistently across the internet.

HTTP Request Methods

HTTP defines request methods to indicate the desired action for a resource.

Here are the 9 important request methods:

  • GET retrieves data from a specified resource.
  • HEAD retrieves data from a specified resource without returning the body of the response.
  • POST sends data to a server to create a new resource.
  • PUT updates an existing resource with new data.
  • DELETE removes a specified resource.
  • OPTIONS retrieves the HTTP methods that the server supports.
  • TRACE traces the request message across the network path to the server.
  • PATCH applies partial modifications to a resource.
  • CONNECT establishes a tunnel connection to a server.

HTTP Status Codes

Here is the complete list of HTTP status codes.

1XX Informational

  • 100 (Continue)
  • 101 (Switching Protocols)
  • 102 (Processing)
  • 103 (Early Hints)

2XX Successful

  • 200 (OK)
  • 201 (created)
  • 202 (Accepted)
  • 203 (Non-Authoritative Information)
  • 204 (No Content)
  • 205 (Reset Content)
  • 206 (Partial Content)
  • 207 (Multi-Status)
  • 208 (Already Reported)
  • 226 (IM Used)

3XX Redirection

  • 300 (Multiple Choices)
  • 301 (Moved Permanently)
  • 302 (Round)
  • 303 (See Other)
  • 304 (Not Modified)
  • 305 (Use Proxy)
  • 306 (Switch Proxy)
  • 307 (Temporary Redirect)
  • 308 (Permanent Redirect)

4XX Client Error

  • 400 (Bad Request)
  • 401 (Unauthorized)
  • 402 (Payment Required)
  • 403 (Rorbidden)
  • 404 (Not Round)
  • 405 (Method Not Allowed)
  • 406 (Not Acceptable)
  • 407 (Proxy Authentication Required)
  • 408 (Request Timeout)
  • 409 (Conflict)
  • 410 (Gone)
  • 411 (Length Required)
  • 412 (Precondition Failed)
  • 413 (Payload Too Large)
  • 414 (URI Too Long)
  • 415 (Unsupported Media Type)
  • 416 (Range Not Satisfiable)
  • 417 (Expectation Failed)
  • 418 (I’m a Teapot)
  • 421 (Misdirected ReqRest)
  • 422 (Unprocessable Entitya)
  • 423 (Locked)
  • 424 (Failed Dependency)
  • 425 (Too Early)
  • 426 (Upgrade ReqRireda)
  • 428 (Precondition ReqRireda)
  • 429 (Too Many ReqRests)
  • 431 (Request Header Fields Too Large)
  • 451 (Unavailable for Legal Reasons)

5XX Server Error

  • 500 (Internal Server Error)
  • 501 (Not Implemented)
  • 502 (Bad Gateway)
  • 503 (Service Unavailable)
  • 504 (Gateway Timeout)
  • 505 (HTTP Version Not Supported)
  • 506 (Variant Also Ne.otiates)
  • 507 (Insufficient Storage)
  • 508 (Loop Detected)
  • 510 (Not Extended)
  • 511 (Network Authentication Required)

1XX Informational

  • 100 Continue
    Server has received initial part of request, and will send a final response once it processes the full content.
  • 101 Switching Protocols
    Server understands the request to change application protocol and will comply if advantageous.
  • 102 Processing
    Server has received full request and is processing it, no response yet as it has not completed.
  • 103 Early Hints
    Used with Link header to allow browser to preload resources while server is preparing a response.

2XX Successful

  • 200 OK
    Request has succeeded, meaning depends on request method (GET, HEAD, POST, PUT, DELETE, OPTIONS, TRACE).
  • 201 Created
    Server has completed request, creating one or more new resources identified by Location header or target URI.
  • 202 Accepted
    Server has accepted request for processing but is not finished yet, intended for batch processing.
  • 203 Non-authoritative Information
    Request was successful, but transforming proxy changed information before sending to browser.
  • 204 No Content
    Server has completed request but there is no additional content to send in response.
  • 205 Reset Content
    Server has fulfilled request and user should reset document view to its original state.
  • 206 Partial Content
    Server is responding to request for only part of a resource, response includes Content-Range header indicating range or multipart/byteranges Content- Type with Content-Range fields for each part.
  • 207 Multi-Status
    Conveys status of multiple resources, HTTP entity with multi-status root element, used in success/partial/failure situations.
  • 208 Already Reported
    Used inside DAV:propstat response element to prevent repeatedly enumerating internal members of multiple bindings to same collection.
  • 226 IM Used
    Server has fulfilled request for resource, returning it in the body of the message and a representation of the result after applying the request’s precondition.

3XX Redirection

  • 300 Multiple Choices
    Server has multiple options for the resource that the client can choose from.
  • 301 Moved Permanently
    Resource has been permanently moved to new URI, future references should use new URI.
  • 302 Found
    Resource has been temporarily moved to new URI, future references should use original URI.
  • 302 Found
    Resource has been temporarily moved to new URI, future references should use original URI.
  • 303 See Other
    Response to request can be found at another URI, new URI is not a substitute reference for original one.
  • 304 Not Modified
    Resource has not been modified since last requested, can use cached copy of resource.
  • 305 Use Proxy
    Must use a proxy to access the resource, location of the proxy is provided in the response.
  • 306 Switch Proxy
    No longer used, originally used to switch proxy.
  • 307 Temporary Redirect
    Resource has been temporarily moved to new URI, future references should use original URI.
  • 308 Permanent Redirect
    Resource has been permanently moved to new URI, future references should use new URI.

4XX Client Error

  • 400 Bad Request
    Request could not be understood by server due to malformed syntax.
  • 401 Unauthorized
    Requires user authentication to access resource.
  • 402 Payment Required
    Reserved for future use, not currently used.
  • 403 Forbidden
    Server understands request but refuses to authorize it.
  • 403 Forbidden
    Requested resource could not be found on server.
  • 405 Method Not Allowed
    Request method not supported by resource.
  • 406 Not Acceptable
    Resource is only capable of generating response that is not acceptable according to Accept headers.
  • 407 Proxy Authentication Required
    Client must authenticate itself with the proxy to access resource.
  • 408 Request Timeout
    Server did not receive complete request in time to process it.
  • 409 Conflict
    Request could not be completed due to a conflict with current state of resource.
  • 410 Gone
    Resource is no longer available and it is likely permanent.
  • 411 Length Required
    Request did not specify the length of its content, which is required by the resource.
  • 412 Precondition Failed
    Server does not meet one of the preconditions that the requester put on the request.
  • 413 Payload Too Large
    Request is larger than the server is able to process.
  • 414 URI Too Long
    Request URI is too long for the server to process.
  • 415 Unsupported Media Type
    Request body is in a format that the server does not support.
  • 416 Range Not Satisfiable
    Server cannot provide the portion of the resource requested in the Range header.
  • 417 Expectation Failed
    Server cannot meet the requirements of the Expect request header.
  • 418 I’m a Teapot
    HTTP Extension Framework extension code, used to indicate that the server is a teapot and cannot brew coffee (for example).
  • 421 Misdirected Request
    Request was directed at a server that is not able to produce a response.
  • 422 Unprocessable Entity
    Request was well-formed, but semantic errors prevent it from being processed.
  • 423 Locked
    Resource that the request is attempting to modify is locked.
  • 424 Failed Dependency
    Request failed due to failure of a previous request (e.g. a PROPPATCH).
  • 425 Too Early
    Server is unwilling to risk processing a request that might be replayed.
  • 426 Upgrade Required
    Client should switch to a different protocol (such as TLS/1.0).
  • 428 Precondition Required
    Server requires the request to be conditional.
  • 429 Too Many Requests
    Client has sent too many requests in a given amount of time.
  • 431 Request Header Fields Too Large
    Server is unwilling to process the request because its header fields are too large.
  • 451 Unavailable for Legal Reasons
    Client requests a resource that has been removed due to legal reasons, such as a blocked site or page.

5XX Server Error

  • 500 Internal Server Error
    Server encountered an unexpected condition that prevented it from fulfilling the request.
  • 501 Not Implemented
    Server does not support the functionality required to fulfill the request.
  • 502 Bad Gateway
    Server received an invalid response from an upstream server while attempting to fulfill the request.
  • 503 Service Unavailable
    Server is currently unable to handle the request due to a temporary overload or maintenance.
  • 504 Gateway Timeout
    Server did not receive a timely response from an upstream server while attempting to fulfill the request.
  • 505 HTTP Version Not Supported
    Server does not support the HTTP protocol version used in the request.
  • 506 Variant Also Negotiates
    Server has an internal configuration error: transparent content negotiation for the request results in a circular reference.
  • 507 Insufficient Storage
    Server is unable to store the representation needed to complete the request.
  • 508 Loop Detected
    Server detected an infinite loop while processing the request (WebDAV).
  • 510 Not Extended
    Further extensions to the request are required for the server to fulfill it (RFC2774).
  • 511 Network Authentication Required
    Client needs to authenticate to access the network.

LET’S DISCUSS YOUR PROJECT

Comments are closed.

Snehal

Typically replies within a day

Hello, Welcome to BRAHMA TECHNOLAB. Please click below button for chatting us through Skype.