The HTTP headers Expect request-header field is used to indicate specific behaviors or expectations that the server needs to fulfill in order to respond to the client. Generally, Expect: 100-continue is the only expectation defined for the header field. If the data provided in the header field meets the expectation value, then the server responds with 100 indicating that it is a success, else it responds with status 417 specifying that the expectation has failed. The reason behind putting the Expect, that would be to work around broken web servers.
- 100-continue: It means that the server has received the request header and in order to send the request body, the server must respond with status 100 to the client.
Note: There is no need to put a blank header if you are not going to put any Expect clause.
PUT /demo/program HTTP/1.1 Host: original.sample.com Content-Type: video/h264 Content-Length: 2342564178765 Expect: 100-continue
The server now goes through the request headers and either responds with 100 indicating the client to send the request body or return status 417 if the expectations are not met.
Supported Browsers: The browsers compatibility for HTTP headers Expect is unknown right now.