Skip to content
Home » HTTP Response Status Codes: Successful (200 – 299)

HTTP Response Status Codes: Successful (200 – 299)

http-code-2xx

HTTP response status codes are an essential part of web communication, providing valuable information about the outcome of a client’s request.

In our previous blog posts, we explored Informational Responses (100 – 199) and learned how they establish communication and signal the progress of a request.

Now, let’s dive into the second class of HTTP response status codes – Successful Responses (200 – 299). These codes indicate that the client’s request was successfully received, understood, and accepted by the server. Join us as we explore each of these successful responses in detail.

Table: HTTP Response Status Codes – Successful Responses

Status CodeNameDescriptionExample
200OKThe request was successful, and the server sends the requested data in the response body.HTTP/1.1 200 OK
201CreatedThe request was successful, and the server has created a new resource as a result.HTTP/1.1 201 Created
202AcceptedThe server has accepted the request for processing, but the processing is not yet complete.HTTP/1.1 202 Accepted
203Non-Authoritative InformationThe server successfully processed the request, but the returned information may be from a different source.HTTP/1.1 203 Non-Authoritative Information
204No ContentThe request was successful, but there is no data to return (e.g., for DELETE requests).HTTP/1.1 204 No Content
205Reset ContentThe server instructs the client to reset the document view, which is often used after form submissions.HTTP/1.1 205 Reset Content
206Partial ContentThe server successfully fulfilled a partial GET request, returning only a portion of the requested data.HTTP/1.1 206 Partial Content
207Multi-StatusThe server has completed a multi-status response, providing information about multiple independent operations.HTTP/1.1 207 Multi-Status
208Already ReportedThe members of a DAV binding have already been enumerated in a previous response, and are not being included again.HTTP/1.1 208 Already Reported
226IM UsedThe server successfully fulfilled a request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.HTTP/1.1 226 IM Used

HTTP 2xx Status Codes (Successful Responses):

  1. 200 OK:
    • Description: The request was successful, and the server sends the requested data in the response body.
    • Example: HTTP/1.1 200 OK
  2. 201 Created:
    • Description: The request was successful, and the server has created a new resource as a result.
    • Example: HTTP/1.1 201 Created
  3. 202 Accepted:
    • Description: The server has accepted the request for processing, but the processing is not yet complete.
    • Example: HTTP/1.1 202 Accepted
  4. 203 Non-Authoritative Information:
    • Description: The server successfully processed the request, but the returned information may be from a different source.
    • Example: HTTP/1.1 203 Non-Authoritative Information
  5. 204 No Content:
    • Description: The request was successful, but there is no data to return (e.g., for DELETE requests).
    • Example: HTTP/1.1 204 No Content
  6. 205 Reset Content:
    • Description: The server instructs the client to reset the document view, which is often used after form submissions.
    • Example: HTTP/1.1 205 Reset Content
  7. 206 Partial Content:
    • Description: The server successfully fulfilled a partial GET request, returning only a portion of the requested data.
    • Example: HTTP/1.1 206 Partial Content
  8. 207 Multi-Status:
    • Description: The server has completed a multi-status response, providing information about multiple independent operations.
    • Example: HTTP/1.1 207 Multi-Status
  9. 208 Already Reported:
    • Description: The members of a DAV binding have already been enumerated in a previous response, and are not being included again.
    • Example: HTTP/1.1 208 Already Reported
  10. 226 IM Used:
    • Description: The server successfully fulfilled a request for the resource, and the response is a representation of the result of one or more instance manipulations applied to the current instance.
    • Example: HTTP/1.1 226 IM Used

Successful responses (status codes 200 – 299) indicate that the client’s request was successfully received, understood, and processed by the server. These codes are crucial for indicating the positive outcome of various types of requests, such as data retrieval, resource creation, and more.

As a developer, understanding these successful response codes helps in handling successful requests appropriately, interpreting returned data, and ensuring a smooth user experience.

Next, we’ll delve into the world of Redirection Responses (300 – 399), which signal that further action is needed to complete the request. Happy coding!


Visit Techtalkbook to find more related topics.


References

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status

1 thought on “HTTP Response Status Codes: Successful (200 – 299)”

  1. Pingback: Macronimous Blog | Essential HTTP Status Codes Every web Programmer Should Know

Leave a Reply

Your email address will not be published. Required fields are marked *