expect
- Summary
Controls the behavior of the "Expect: 100-Continue" header.- Types
-
- bool
- integer
- Default
1048576
- Constant
GuzzleHttp\RequestOptions::EXPECT
Set to
true
to enable the "Expect: 100-Continue" header for all requeststhat sends a body. Set to false
to disable the "Expect: 100-Continue"header for all requests. Set to a number so that the size of the payload mustbe greater than the number in order to send the Expect header. Setting to anumber will send the Expect header for all requests in which the size of thepayload cannot be determined or where the body is not rewindable.
By default, Guzzle will add the "Expect: 100-Continue" header when the size ofthe body of a request is greater than 1 MB and a request is using HTTP/1.1.
Note
This option only takes effect when using HTTP/1.1. The HTTP/1.0 andHTTP/2.0 protocols do not support the "Expect: 100-Continue" header.Support for handling the "Expect: 100-Continue" workflow must beimplemented by Guzzle HTTP handlers used by a client.