Skip to main content

build_client

Function build_client 

Source
pub fn build_client(
    default_timeout: Option<Duration>,
    follow_redirect: bool,
    verify_ssl: bool,
    proxy: Option<&str>,
) -> Result<Client, RuntimeError>
Expand description

Build the reqwest client used for HTTP probes.

The settings here are the executor-wide defaults; an individual probe can override the timeout, redirect, TLS-verification, and proxy behaviour in its own HttpRequestSpec, in which case a separate client is built for it.

ยงErrors

Returns RuntimeError::Http when the proxy URL is malformed or the TLS backend fails to initialize.