What Is a 102 Status Code?
An interim response used to inform the client that the server has accepted the complete request but has not yet completed it.
This status code SHOULD only be sent when the server has a reasonable expectation that the request will take significant time to complete. As guidance, if a method is taking longer than 20 seconds (a reasonable, but arbitrary value) to process the server SHOULD return a 102 (Processing) response. The server MUST send a final response after the request has been completed.
Methods can potentially take a long period of time to process, especially methods that support the Depth header. In such cases the client may time-out the connection while waiting for a response. To prevent this the server may return a 102 Processing status code to indicate to the client that the server is still processing the method.
- Source: RFC2518 Section 10.1
102 CODE REFERENCES
Rails HTTP Status Symbol
Symfony HTTP Status Constant
Apache HttpComponents Core
102 status code example
Here is an example of a request and response that could result in a 102 status code:
GET https://example.com/ HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.80 Safari/537.36
HTTP/1.1 102 Processing
Date: Wed, 16 Mar 2023 12:00:00 GMT
In this example, the client is attempting to access the homepage of the
example.com website using an HTTP GET request. The server responds with a 102 Processing status code, which indicates that it has received the request and is currently processing it, but has not yet completed the request.
The server includes an empty response body with no content, and a few headers like
The 102 status code is an informational response, and it can be used to inform the client that the server has received the request and is working on it, especially if the request requires a lot of processing time, or if the server needs to perform some time-consuming tasks before it can produce a final response.
What causes a 102 status code?
A server may send a 102 status code in response to any type of HTTP request, including GET, POST, PUT, DELETE, etc., if it needs to take some time to process the request. Some examples of scenarios where a server may use a 102 status code include:
- A server is performing some heavy computation or data processing tasks in response to the request.
- A server is retrieving data from a slow or busy backend system or database.
- A server is waiting for other services or systems to respond before it can provide a final response to the client.
- A server is implementing a long-polling or streaming API, where it needs to keep the connection open and provide periodic updates to the client.
- Learn about web development
- Learn about SEO
- Web development services from WebFX
- SEO services from WebFX
- MDN Web Docs