Accepted 202 The request has been accepted for processing, but the processing has not been completed. The request may or may not eventually be acted upon, as it may be disallowed when processing actually takes place.
- What is the difference between 200 and 202 status code?
- What is status code 202 in REST API?
- What is the difference between 201 and 202 status code?
- Does 202 have a response body?
What is the difference between 200 and 202 status code?
200 OK means that the request has succeeded and the processing of our request is done. The response is the final payload and the service will not take further actions. 202 Accepted on the other hand means that the request have been accepted for processing, and the service will now start.
What is status code 202 in REST API?
The REST API has accepted the user request. A 202 response is typically used for requests which either take a long time to process, or for requests that are not guaranteed to be fulfilled. The current status of the user's request can be returned in the response message URI path using HTTP-to-JSON mapping.
What is the difference between 201 and 202 status code?
A 201 status code indicates that a request was successful and as a result, a resource has been created (for example a new page). The status code 202 indicates that server has received and understood the request, and that it has been accepted for processing, although it may not be processed immediately.
Does 202 have a response body?
The 202 response is intentionally non-committal. Its purpose is to allow a server to accept a request for some other process (perhaps a batch-oriented process that is only run once per day) without requiring that the user agent's connection to the server persist until the process is completed.