Struct isahc::config::ExpectContinue [−][src]
pub struct ExpectContinue { /* fields omitted */ }
Expand description
Controls the use of the Expect
request header when sending request bodies
with HTTP/1.1.
By default, when sending requests containing a body of large or unknown length over HTTP/1.1, Isahc will send the request headers first without the body and wait for the server to respond with a 100 (Continue) status code, as defined by RFC 7231, Section 5.1.1. This gives the opportunity for the server to reject the response without needing to first transmit the request body over the network, if the body contents are not necessary for the server to determine an appropriate response.
For servers that do not support this behavior and instead simply wait for the request body without responding with a 100 (Continue), there is a limited timeout before the response body is sent anyway without confirmation. The default timeout is 1 second, but this can be configured.
The Expect
behavior can also be disabled entirely.
This configuration only takes effect when using HTTP/1.1.
Implementations
Enable the use of Expect
and wait for a 100 (Continue) response with a
default timeout before sending a request body.
Enable the use of Expect
and wait for a 100 (Continue) response, up to
the given timeout, before sending a request body.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ExpectContinue
impl Send for ExpectContinue
impl Sync for ExpectContinue
impl Unpin for ExpectContinue
impl UnwindSafe for ExpectContinue
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more