Struct reqwest::unstable::async::ClientBuilder [] [src]

pub struct ClientBuilder { /* fields omitted */ }

A ClientBuilder can be used to create a Client with custom configuration:

Methods

impl ClientBuilder
[src]

[src]

Constructs a new ClientBuilder

[src]

Returns a Client that uses this ClientBuilder configuration.

Errors

This method fails if native TLS backend cannot be initialized.

Panics

This method consumes the internal state of the builder. Trying to use this builder again after calling build will panic.

[src]

Add a custom root certificate.

This can be used to connect to a server that has a self-signed certificate for example.

[src]

Sets the identity to be used for client certificate authentication.

[src]

Disable hostname verification.

Warning

You should think very carefully before you use this method. If hostname verification is not used, any valid certificate for any site will be trusted for use from any other. This introduces a significant vulnerability to man-in-the-middle attacks.

[src]

Enable hostname verification.

[src]

Enable auto gzip decompression by checking the ContentEncoding response header.

Default is enabled.

[src]

Add a Proxy to the list of proxies the Client will use.

[src]

Set a RedirectPolicy for this client.

Default will follow redirects up to a maximum of 10.

[src]

Enable or disable automatic setting of the Referer header.

Default is true.

[src]

Set a timeout for both the read and write operations of a client.

Trait Implementations

impl Debug for ClientBuilder
[src]

[src]

Formats the value using the given formatter.