> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# HttpClientConfig

> HttpClientConfig — Kinetica Rust API

[gpudb\_api](https://docs.kinetica.com/content/api/rust/index.md)::<wbr />[hyper\_client](https://docs.kinetica.com/content/api/rust/hyper_client/index.md)
[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/hyper_client.rs#L60-L100)&#x20;

<pre>`pub struct HttpClientConfig {    pub bypass_ssl_cert_check: bool,    pub trust_store: Option<Arc<TrustStore>>,    pub connect_timeout: Option<Duration>,    pub request_timeout: Option<Duration>,    pub max_connections_per_host: usize,    pub max_total_connections: usize,    pub connection_request_timeout: Duration,    pub max_retries: usize,    pub tcp_keep_alive: bool,    pub tcp_keep_idle: u32,    pub tcp_keep_interval: u32,    pub tcp_keep_count: u32,    pub connection_time_to_live: Duration,}`</pre>

Connection settings for a [`HyperClient`](https://docs.kinetica.com/content/api/rust/hyper_client/struct.HyperClient).[`HttpClientConfig::from_options`](https://docs.kinetica.com/content/api/rust/hyper_client/struct.HttpClientConfig#method.from_options) derives them from `KineticaOptions`.

Fields
`bypass_ssl_cert_check: bool`

Accept any server certificate. See \[`AcceptAnyServerCert`] for what this gives up.

`trust_store: Option<Arc<TrustStore>>`

The trust store to trust servers by, in place of the system’s roots

`connect_timeout: Option<Duration>`

Limit on establishing a connection; `None` waits indefinitely.

`request_timeout: Option<Duration>`

Read timeout: the limit on the wait for a response once the request has been sent, and then on each read of its body; the upload is not limited. `None` waits indefinitely.

`max_connections_per_host: usize`

Most requests in flight to one host at a time; also the number of idle connections kept per host for reuse. At least 1.

`max_total_connections: usize`

Most requests in flight across all hosts at a time. At least 1.

`connection_request_timeout: Duration`

How long a request waits for a free connection when a limit above is reached, before failing as a connection error.

`max_retries: usize`

How many times an API request is retried, at once and on the same server: when sending it fails without a response (the connection is refused, reset or closed, the host is unknown, or no response arrives within the timeout), or the response is a 502 or 503. A connect timeout, a TLS failure or a failure reading the response body is not retried, and neither are health checks.

`tcp_keep_alive: bool`

Whether connections send TCP keep-alive probes: on by default with the operating system’s timings.

`tcp_keep_idle: u32`

Seconds a connection idles before the first probe; 0 keeps the system’s.

`tcp_keep_interval: u32`

Seconds between probes; 0 keeps the system’s.

`tcp_keep_count: u32`

Probes before the connection is dropped; 0 keeps the system’s.

`connection_time_to_live: Duration`

How long after its opening a connection may be reused: [`CONNECTION_TIME_TO_LIVE`](https://docs.kinetica.com/content/api/rust/hyper_client/index#constant.CONNECTION_TIME_TO_LIVE), one minute, by default.

## Implementations

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/hyper_client.rs#L118-L147)
impl [HttpClientConfig](https://docs.kinetica.com/content/api/rust/hyper_client/struct.HttpClientConfig.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/hyper_client.rs#L129-L146)
pub fn [from\_options](#method.from_options)(options: &[KineticaOptions](https://docs.kinetica.com/content/api/rust/gpudb/struct.KineticaOptions.md)) -> Self

Takes the connection settings from `options`:

<ul>
  <li>`server_connection_timeout` is the connect timeout,</li>
  <li>`timeout` is the request timeout,</li>
  <li>`max_connections_per_host` and `max_total_connections` cap the requests in flight.</li>
</ul>

A timeout of 0 means no limit. A connection limit below 1, which `Kinetica` refuses, is raised to 1 here for a configuration built some other way.

## Trait Implementations

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/hyper_client.rs#L59)
impl [Clone](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html) for [HttpClientConfig](https://docs.kinetica.com/content/api/rust/hyper_client/struct.HttpClientConfig.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/hyper_client.rs#L59)
fn [clone](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#tymethod.clone)(\&self) -> [HttpClientConfig](https://docs.kinetica.com/content/api/rust/hyper_client/struct.HttpClientConfig.md)

Returns a duplicate of the value. [Read more](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#tymethod.clone)

1.0.0 (const: [unstable](https://github.com/rust-lang/rust/issues/142757)) · [Source](https://doc.rust-lang.org/1.98.1/src/core/clone.rs.html#245-247)
fn [clone\_from](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#method.clone_from)(\&mut self, source: \&Self)

Performs copy-assignment from `source`. [Read more](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#method.clone_from)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/hyper_client.rs#L59)
impl [Debug](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html) for [HttpClientConfig](https://docs.kinetica.com/content/api/rust/hyper_client/struct.HttpClientConfig.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/hyper_client.rs#L59)
fn [fmt](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html#tymethod.fmt)(\&self, f: \&mut [Formatter](https://doc.rust-lang.org/1.98.1/core/fmt/struct.Formatter.html)\<'\_>) -> [Result](https://doc.rust-lang.org/1.98.1/core/fmt/type.Result.html)

Formats the value using the given formatter. [Read more](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html#tymethod.fmt)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/hyper_client.rs#L112-L116)
impl [Default](https://doc.rust-lang.org/1.98.1/core/default/trait.Default.html) for [HttpClientConfig](https://docs.kinetica.com/content/api/rust/hyper_client/struct.HttpClientConfig.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/hyper_client.rs#L113-L115)
fn [default](https://doc.rust-lang.org/1.98.1/core/default/trait.Default.html#tymethod.default)() -> Self

Returns the “default value” for a type. [Read more](https://doc.rust-lang.org/1.98.1/core/default/trait.Default.html#tymethod.default)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.