zng::task::http

Function set_default_client_init

source
pub fn set_default_client_init<I>(
    init: I,
) -> Result<(), DefaultAlreadyInitedError>
where I: FnOnce() -> Client + Send + 'static,
Expand description

Set a custom initialization function for the default_client.

The default_client is used by all functions in this module and is initialized on the first usage, you can use this function before any HTTP operation to replace the isahc client.

Returns an error if the default_client was already initialized.