417 Expectation Failed is an HTTP response status code indicating that the server cannot meet the requirements specified in the Expect request header sent by the client.
Expect header contains unsupported expectationsExpect: 100-continueClients may send an Expect header to ask the server if it is willing to handle the request. If the server cannot satisfy the expectation, it responds with 417.
// HTTP request with Expect header
POST /upload HTTP/1.1
Host: example.com
Expect: 100-continue
Content-Length: 2048
If the server does not support the expectation, it immediately returns:
// Server response when expectation cannot be met
HTTP/1.1 417 Expectation Failed
Content-Type: text/plain
Configure the client and server settings below to see how the 417 error is triggered.
Think of 417 as a pre-check failure. The client asks: “Are you okay if I send this data?” If the server says “No”, it responds with 417 without reading the body.
Expect headers unless required100-continue if clients use itExpect: 100-continue using curl