Expect
RequestActiveThe Expect header allows a client to indicate that it requires certain server behaviors before sending a large request body. The only defined value is '100-continue' – the client sends headers first and waits for a 100 Continue response before sending the body. This avoids sending large payloads to servers that will reject the request.
Description
Expect: 100-continue is a two-phase request mechanism. The client sends the request headers (including Content-Length) and waits for 100 Continue before sending the body. If the server would reject the request (e.g., authentication required, file too large), it returns 417 Expectation Failed or 401/413 immediately, saving the bandwidth of transmitting the body. Used by curl with --expect100-timeout, and by S3 multipart upload clients.
Examples
POST /api/upload HTTP/1.1
Content-Length: 104857600
Expect: 100-continue
# Server responds:
HTTP/1.1 100 Continue
# Client now sends the 100MB body