pub struct ExpectContinue { /* private fields */ }
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.

Disable the use and handling of the Expect request header.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Converts to this type from the input type.
Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
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