1xx InformationalRFC 9110
100Continue
Server received request headers, client should proceed.
What it means
The server has received the request headers and the client should proceed to send the request body. This is used when the client wants to send a large request body and checks first whether the server will accept it.
When to use it
- ✓Client sends Expect: 100-continue header before a large request body
- ✓Server confirms it will accept the request before the body is sent
- ✓Useful for avoiding sending large payloads to endpoints that will reject them
Code Examples
Express — handling large uploads
javascript
// Client sends Expect: 100-continue
// Server automatically responds with 100 Continue
// before the body is received
app.post('/upload', (req, res) => {
// Body streams in after 100 Continue is sent
res.status(200).json({ received: true });
});