102 Processing
HTTP response status code 102 Processing is an informational HTTP response that is sent by a server to inform the client that there will be a significant delay before the final HTTP response is sent and that a potentially long period of time will pass before receiving the final HTTP response. As such, the client will understand not to time out too early.
Usage
When a server sends the 102 Processing status code, the client will maintain the HTTP Connection and wait for the final HTTP response to arrive. Ultimately, the server must return the final HTTP response or a genuine timeout will occur.
The 102 Processing status code is no longer part of the HTTP specifications, although it is still used in practice. Furthermore, a robust HTTP client will ignore informational status messages that it does not recognize, so this message will not negatively impact clients that have no explicit support for this HTTP status code.
Note
Multiple 102 Processing status updates can be sent in advance of the final HTTP response.
Example
In the following example, the client requests a sample.pdf file, and the server returns with a HTTP status code indicating that processing the HTTP request takes longer than usual. A short time later, the server reminds the client that it is still waiting to process the HTTP request. After another delay, the server sends the final HTTP response.
Request
GET /sample.pdf HTTP/1.1
Host: www.example.re
Response
HTTP/1.1 102 Processing
<there is a short pause in the transmission>
HTTP/1.1 102 Processing
<there is a short pause in the transmission>
HTTP/1.1 200 OK
Content-Type: application/pdf
Content-Length: 10000
<message body will follow>
Code references
.NET
HttpStatusCode.Processing
Rust
http::StatusCode::PROCESSING
Rails
:processing
Go
http.StatusProcessing
Symfony
Response::HTTP_PROCESSING
Python3.5+
http.HTTPStatus.PROCESSING
Apache HttpComponents Core
org.apache.hc.core5.http.HttpStatus.SC_PROCESSING
Angular
@angular/common/http/HttpStatusCode.Processing
Takeaway
The 102 Processing informational response status code is sent by the server to inform the client that a delay will occur before the final HTTP response is sent to the client.