client_defaults!() { /* proc-macro */ }Expand description
Registers global default configurations for HTTP clients.
This macro submits a configuration record to the global registry that will
be applied to all HTTP clients created with default_builder().
§Parameters
priority(optional): Integer priority for ordering (lower runs first, default: 0)- Configuration items: Any valid
reqwest::ClientBuildermethod calls
§Example
ⓘ
use nym_http_api_client_macro::client_defaults;
client_defaults!(
priority = -50; // Run early in the configuration chain
connect_timeout = std::time::Duration::from_secs(10),
pool_max_idle_per_host = 32,
default_headers {
"User-Agent" => "Nym/1.0",
"Accept" => "application/json"
}
);