Cargo Features

[dependencies]
httpmock = { version = "0.8.0-alpha.1", default-features = false, features = ["standalone", "color", "cookies", "remote", "remote-https", "proxy", "https", "http2", "record", "experimental"] }
default = cookies

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

standalone = clap, cookies, env_logger, http2, record, remote, remote-https

enables standalone mode

Required by the binary

color = colored

enables colorful output in standalone mode

cookies default standalone? = headers

enables support for matching cookies

remote remote-https? standalone?

allows to connect to remote mock servers

Enables client-legacy and http2 of hyper-util

Affects adapter::remote, common::http

remote-https proxy? standalone? = hyper-rustls, remote, rustls

allows to connect to remote mock servers via HTTPS

Enables http2 of hyper-rustls

proxy record? = hyper-rustls, remote-https

enables proxy functionality

Enables http2 of hyper-rustls, client-legacy and http2 of hyper-util

Affects common::http

https = rcgen, rustls, rustls-pemfile, tls-detect, tokio-rustls

enables httpmock server support for TLS/HTTPS

Enables ring of rustls

TLS / HTTPS / PROXY

Affects builder::HttpsConfigBuilder, server::MockServerHttpsConfig, server::MockServerConfig.https

http2 standalone?

enables httpmocks server support for HTTP2

Enables http2 of hyper and hyper-util

record standalone? = proxy, serde_yaml

Affects adapter::MockServerAdapter.export_recording, adapter::MockServerAdapter.create_mocks_from_recording

experimental

marker feature for experimental features

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

colored color?
clap standalone?
env_logger standalone?
serde_yaml record?
headers cookies
rustls https? remote-https?
rcgen https?

Enables rcgen ^0.12

tokio-rustls https?
rustls-pemfile https?
tls-detect https?
hyper-rustls proxy? remote-https?