A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Expect below:

Expect - HTTP | MDN

Expect

The HTTP Expect request header indicates that there are expectations that need to be met by the server in order to handle the complete request successfully.

When a request has an Expect: 100-continue header, a server sends a 100 Continue response to indicate that the server is ready or capable of receiving the rest of the request content. Waiting for a 100 response can be helpful if a client anticipates that an error is likely, for example, when sending state-changing operations without previously verified authentication credentials.

A 417 Expectation Failed response is returned if the server cannot meet the expectation, or any other status otherwise (e.g., a 4XX status for a client error, or a 2XX status if the request can be resolved successfully without further processing).

None of the more common browsers send the Expect header, but some clients (command-line tools) do so by default.

Syntax Directives

There is only one defined expectation:

100-continue

Informs recipients that the client is about to send a (presumably large) message body in this request and wishes to receive a 100 Continue interim response.

Examples Large message body

A client sends a request with Expect header and waits for the server to respond before sending the message body.

PUT /somewhere/fun HTTP/1.1
Host: origin.example.com
Content-Type: video/h264
Content-Length: 1234567890987
Expect: 100-continue

The server checks the headers and generates the response, where a 100 Continue instructs the client to send the message body:

The client completes the request by sending the actual data:

[Video data as content for PUT request]
Specifications See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3