set_http_client

Function set_http_client 

Source
pub fn set_http_client<I>(init: I) -> Result<(), AlreadyInitedError>
where I: FnOnce() -> Box<dyn HttpClient> + Send + 'static,
Expand description

Set a custom initialization function for the http_client.

The http_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 backend implementation.

Returns an error if the http_client was already initialized.