The 408 Request Timeout status code indicates that the server did not receive a complete request from the client within the time it was prepared to wait.
HTTP status code 408 belongs to the 4xx Client Error class. It is returned when the client initiates a request but fails to complete it within the server-defined timeout period.
// Example of an HTTP response with 408 status
HTTP/1.1 408 Request Timeout
Content-Type: text/html
Connection: close
// Node.js example sending 408 response
res.status(408).send("Request Timeout");
If a client does not send request headers or body data in time, the server terminates the connection and responds with 408 Request Timeout.
Imagine a server waiting for a request like a customer service desk. If no details are provided within a reasonable time, the request is dropped to free resources.
Click "Start Request" and try to click "Complete Data" before the timer runs out!
// Pseudo timeline of a timeout scenario
Client connects → waits too long → server closes connection
Simulate a delayed request using a network throttling tool or intentionally pause request sending to observe how servers respond with a timeout.