417 Expectation Failed

The HTTP 417 status code means a server couldn’t understand or doesn’t support the Expect header.

Before making a request, clients may ask permission from the server to proceed with the request. It’s useful when clients are about to send a large body and do not waste bandwidth in case the server declines their request. This process is facilitated with the help of the Expect header. This header can only have a single value, which is 100-Continue.

Some HTTP clients/libraries append the Expect header to every request. If you keep getting the 417 Expectation Failed error, try unsetting this header before retrying the request. If you can’t remove this header, you can pass the empty value instead:


Try it yourself

Send the Expect HTTP header with a non-empty value other than 100-Continue:

curl -H 'Expect: LOL' -X POST https://example.com

See also

Interested in no-nonsense technical guides?

No spyware, no promotional emails, or keyword-stuffed junk. I will only send you a single email when I've got something interesting to say. Unsubscribe anytime.

You can also subscribe to the Atom feed (it's like RSS, but better).