202 Accepted
The HTTP 202 Status code is returned by the server to indicate that an HTTP request has been received, though the processing isn't yet complete and the HTTP request may not be fulfilled.
The HTTP 202 Accepted status code is used by the server to acknowledge the receipt of an HTTP request.
It indicates that the request has been successfully received and acknowledged by the server, but the processing of the request is still ongoing, and the final fulfillment of the request is not yet guaranteed.
The server may continue to process the request in the background, and the client should check for updates or await further instructions before assuming the request is completed.
When receiving the 202 Accepted status code, it serves as an acknowledgment from the server that the HTTP request has been successfully received and will be processed.
This typically means the server has verified the request's format and placed it in an internal processing queue. The client may need to periodically check for updates, as the server cannot provide an immediate outcome for the request.
Once a final HTTP response with a status code of 200 OK is received, the client can stop polling. Other possible status codes like 201 Created or 204 No Content may indicate successful creation or completion of the request, depending on the context.
In this sample, the client starts a POST request to the server, submitting XML data to define a job completion task. The server acknowledges the acceptance of the data with a 202.
Accepted status code and provides a link to check the status of the job. Subsequently, the client makes multiple HTTP requests to inquire about the job status until a 200 OK status code is received with a JSON response indicating success.
When receiving the 200 OK status code, the client stops polling and takes appropriate actions based on the job's completion status.
The 202 Accepted HTTP status code signifies that the server has received the HTTP request and is processing it, but the final outcome is not yet determined.
Clients may use this status code to acknowledge successful reception of their request and await further updates on the processing status.
Once the server responds with a 200 OK status code, indicating successful completion, the client can stop polling and proceed accordingly based on the job's result.