Cargo Features

http-client = { version = "6.5.3", default-features = false, features = ["h1_client", "native_client", "curl_client", "wasm_client", "hyper_client", "native-tls", "rustls", "docs", "unstable-config"] }
default = h1_client, native-tls

These default features are set whenever http-client is added without default-features = false somewhere in the dependency tree.

h1_client default docs? = async-h1, async-std, dashmap, deadpool, futures

Affects config::Config.tls_config, config::Config.tls_config, http-client::h1

native_client = curl_client, wasm_client
curl_client docs? native_client? = async-std, isahc

Affects http-client::isahc, http-client::native

wasm_client docs? native_client? = async-std, futures, js-sys, wasm-bindgen, wasm-bindgen-futures, web-sys

Affects http-client::wasm, http-client::native

hyper_client docs? = futures-util, hyper, hyper-tls, tokio

Enables hyperium_http of http-types

Affects http-client::hyper

native-tls default = async-native-tls

Affects config::Config.tls_config

rustls = async-tls, rustls_crate

Affects config::Config.tls_config

docs = curl_client, h1_client, hyper_client, wasm_client


Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

async-h1 h1_client

async-std curl_client? h1_client wasm_client?
async-native-tls native-tls

Enables default (runtime-async-std) of async-native-tls ^0.3.1

dashmap h1_client
deadpool h1_client

Enables default features of deadpool ^0.7.0

futures h1_client wasm_client?

With default features

async-tls rustls?

Enables default features of async-tls ^0.10.0


rustls_crate rustls?

Enables default (logging) of rustls ^0.18

hyper hyper_client?

Enables tcp and default features of hyper ^0.13.6


hyper-tls hyper_client?

Enables hyper-tls ^0.4.3

futures-util hyper_client?

With io and default features

tokio hyper_client?

Enables time of tokio ^0.2

isahc cfg(not(target_arch = "wasm32")) curl_client?

Enables http2 of isahc ^0.9

js-sys cfg(target_arch = "wasm32") wasm_client?
wasm-bindgen cfg(target_arch = "wasm32") wasm_client?

With default features

wasm-bindgen-futures cfg(target_arch = "wasm32") wasm_client?
web-sys cfg(target_arch = "wasm32") wasm_client?

With AbortSignal, Headers, ObserverCallback, ReferrerPolicy, Request, RequestCache, RequestCredentials, RequestInit, RequestMode, RequestRedirect, Response, Window and WorkerGlobalScope