use nym_http_api_client_macro::{client_cfg, client_defaults};
use std::time::Duration;
#[test]
fn test_client_cfg_basic() {
let _config = client_cfg!(timeout = Duration::from_secs(30), gzip = true);
}
#[test]
fn test_client_cfg_with_headers() {
let _config = client_cfg!(
timeout = Duration::from_secs(30),
default_headers {
"User-Agent" => "TestApp/1.0",
"Accept" => "application/json"
}
);
}
#[test]
fn test_client_cfg_with_method_calls() {
let _config = client_cfg!(
pool_max_idle_per_host = 32,
tcp_nodelay = true,
danger_accept_invalid_certs = true
);
}
#[test]
fn test_client_defaults_with_priority() {
client_defaults!(
priority = -100;
gzip = true,
deflate = true
);
}
#[test]
fn test_client_defaults_without_priority() {
client_defaults!(brotli = true, zstd = true);
}
#[test]
fn test_empty_client_cfg() {
let _config = client_cfg!();
}
#[test]
fn test_client_cfg_closure_application() {
let config = client_cfg!(gzip = true);
let builder = reqwest::ClientBuilder::new();
let _configured_builder = config(builder);
}