pub fn client_from_env() -> Client
Expand description

Constructs a network client from the TELOXIDE_PROXY environmental variable.

This function passes the value of TELOXIDE_PROXY into reqwest::Proxy::all, if it exists, otherwise returns the default client.

Note

The created client will have safe settings, meaning that it will be able to work in long time durations, see the issue 223.

Panics

If TELOXIDE_PROXY exists, but isn’t correct url.