HTTP 100 Continue is an informational status code used in client–server communication. It tells the client that the server has received the request headers and the client can proceed to send the request body.
Expect: 100-continue headerWhen a client sends a request with the header Expect: 100-continue, it waits for the server’s response before sending the body. If the server replies with 100 Continue, the client proceeds with the request body.
// HTTP request headers asking server permission before sending body
POST /upload HTTP/1.1
Host: example.com
Expect: 100-continue
Content-Length: 5242880
If the server accepts the headers, it responds with:
// Server tells client to continue sending request body
HTTP/1.1 100 Continue
Think of HTTP 100 Continue like a security check: the client asks "Should I send the big data?", and the server replies "Yes, go ahead."
// Pseudo-flow of 100 Continue interaction
Client -> Headers only
Server -> 100 Continue
Client -> Sends full request body
Server -> Final response
Expect: 100-continue only for large requestsExpect: 100-continue