Skip to main content

build_client

Function build_client 

Source
pub fn build_client(
    timeout_secs: u64,
    force_ipv4: bool,
    dns: Option<IpAddr>,
) -> Result<Client>
Expand description

Build a reqwest client with the shared launcher configuration.

DNS behaviour, in precedence order:

  • dns = Some(ip) → resolve every name via DNS-over-HTTPS against that resolver IP (see [DohResolver]); honours force_ipv4 by requesting only A records.
  • dns = None and force_ipv4 = true → use the system resolver but keep only IPv4 results (see [Ipv4OnlyResolver]).
  • otherwise → reqwest’s default system resolver.