Struct awc::ClientBuilder[][src]

pub struct ClientBuilder { /* fields omitted */ }
Expand description

An HTTP Client builder

This type can be used to construct an instance of Client through a builder-like pattern.

Implementations

Use custom connector service.

Set request timeout

Request timeout is the total time before a response must be received. Default value is 5 seconds.

Disable request timeout.

Do not follow redirects.

Redirects are allowed by default.

Maximum supported http major version Supported versions http/1.1, http/2

Indicates the initial window size (in octets) for HTTP2 stream-level flow control for received data.

The default value is 65,535 and is good for APIs, but not for big objects.

Indicates the initial window size (in octets) for HTTP2 connection-level flow control for received data.

The default value is 65,535 and is good for APIs, but not for big objects.

Set max number of redirects.

Max redirects is set to 10 by default.

Do not add default request headers. By default Date and User-Agent headers are set.

Add default header. Headers added by this method get added to every request.

Set client wide HTTP basic authorization header

Set client wide HTTP bearer authentication header

Finish build process and create Client instance.

Trait Implementations

Returns the “default value” for a type. Read more

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

Performs the conversion.

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

Performs the conversion.

Should always be Self

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