pub fn build_profiled_client_preset(
profile: &TlsProfile,
proxy_url: Option<&str>,
) -> Result<Client, TlsClientError>Expand description
Build a [reqwest::Client] using profile-specific control presets.
without manually selecting TlsControl fields.
§Errors
Returns TlsClientError::TlsConfig when the underlying
TlsProfile::to_rustls_config_with_control call fails (unsupported
cipher suites / groups under the strict profile preset), and
TlsClientError::Reqwest for the wrapped reqwest::Client::builder
failures (including proxy URL parsing).
§Example
use stygian_browser::tls::{build_profiled_client_preset, CHROME_131};
let client = build_profiled_client_preset(&CHROME_131, None).unwrap();
let _ = client;