set_http_cache

Function set_http_cache 

Source
pub fn set_http_cache<I>(init: I) -> Result<(), AlreadyInitedError>
where I: FnOnce() -> Box<dyn HttpCache> + 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.