Cargo Features

reqwest = { version = "0.11.22", default-features = false, features = ["default-tls", "native-tls", "native-tls-alpn", "native-tls-vendored", "rustls-tls", "rustls-tls-manual-roots", "rustls-tls-webpki-roots", "rustls-tls-native-roots", "blocking", "cookies", "gzip", "brotli", "deflate", "json", "multipart", "trust-dns", "stream", "socks", "http3"] }
default = default-tls

The default-tls feature is set by default whenever reqwest is added without default-features = false somewhere in the dependency tree.

default-tls default native-tls? = __tls, hyper-tls, native-tls-crate, tokio-native-tls

Note: this doesn't enable the 'native-tls' feature, which adds specific functionality for it.

native-tls native-tls-alpn? native-tls-vendored? = default-tls

Enables native-tls specific functionality not available by default.

native-tls-alpn = native-tls

Enables alpn of native-tls

native-tls-vendored = native-tls

Enables vendored of native-tls

rustls-tls = rustls-tls-webpki-roots
rustls-tls-manual-roots http3? = __rustls
rustls-tls-webpki-roots rustls-tls? = __rustls, webpki-roots
rustls-tls-native-roots = __rustls, rustls-native-certs

Enables io of futures-util, rt-multi-thread and sync of tokio

Affects reqwest::blocking

cookies = cookie_crate, cookie_store

Affects reqwest::cookie

gzip = async-compression, tokio-util

Enables gzip of async-compression

brotli = async-compression, tokio-util

Enables brotli of async-compression

deflate = async-compression, tokio-util

Enables zlib of async-compression

json = serde_json
multipart = mime_guess

Affects async_impl::multipart, blocking::multipart, wasm::multipart

trust-dns = trust-dns-resolver
stream = tokio-util, wasm-streams

Enables fs of tokio

socks = tokio-socks
http3 = futures-channel, h3, h3-quinn, quinn, rustls-tls-manual-roots

Experimental HTTP/3 client.

__tls __rustls? default-tls

Internal (PRIVATE!) features used to aid testing.
Don't rely on these whatsoever. They may disappear at anytime.

Enables common types used for TLS. Useless on its own.

Affects reqwest::tls

__rustls rustls-tls-manual-roots? rustls-tls-native-roots? rustls-tls-webpki-roots? = __tls, hyper-rustls, rustls, rustls-pemfile, tokio-rustls

Enables common rustls code.
Equivalent to rustls-tls-manual-roots but shorter :)

Features from optional dependencies

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

serde_json json?

With default (std)

mime_guess multipart?

Enables cookie ^0.16

Enables cookie_store ^0.16

futures-channel cfg(not(target_arch = "wasm32")) http3?

With default (std)

h3 cfg(not(target_arch = "wasm32")) http3?

Enables h3 ^0.0.2

h3-quinn cfg(not(target_arch = "wasm32")) http3?

Enables h3-quinn ^0.0.3

hyper-rustls cfg(not(target_arch = "wasm32")) __rustls?
hyper-tls cfg(not(target_arch = "wasm32")) default-tls

Enables hyper-tls ^0.5

native-tls-crate cfg(not(target_arch = "wasm32")) default-tls

Enables native-tls

quinn cfg(not(target_arch = "wasm32")) http3?

With tls-rustls, ring and runtime-tokio

rustls cfg(not(target_arch = "wasm32")) __rustls?

Enables dangerous_configuration and default features of rustls ^0.21.6

rustls-native-certs cfg(not(target_arch = "wasm32")) rustls-tls-native-roots?

Enables rustls-native-certs ^0.6

rustls-pemfile cfg(not(target_arch = "wasm32")) __rustls?

Enables rustls-pemfile ^1.0

tokio-native-tls cfg(not(target_arch = "wasm32")) default-tls
tokio-rustls cfg(not(target_arch = "wasm32")) __rustls?

Enables default features of tokio-rustls ^0.24

tokio-socks cfg(not(target_arch = "wasm32")) socks?
trust-dns-resolver cfg(not(target_arch = "wasm32")) trust-dns?

With tokio-runtime and default features

wasm-streams cfg(target_arch = "wasm32") stream?

Enables wasm-streams ^0.3

webpki-roots cfg(not(target_arch = "wasm32")) rustls-tls-webpki-roots?

Enables webpki-roots ^0.25

async-compression cfg(not(target_arch = "wasm32")) brotli? deflate? gzip?

With tokio

tokio-util cfg(not(target_arch = "wasm32")) brotli? deflate? gzip? stream?

With codec and io