Update documentation to show usage of system proxies (#702)

Add several lines that explain the usage of proxies in the current
version. Introduce the familiar HTTP(S)_PROXY syntax so often seen
in http(s) clients.

Closes #685
This commit is contained in:
Daniel Lee
2019-11-07 19:42:48 +00:00
committed by Sean McArthur
parent 3a50ed11f8
commit 8a6bdb7a82

View File

@@ -130,10 +130,16 @@
//!
//! ## Proxies
//!
//! A `Client` can be configured to make use of HTTP proxies by adding
//! [`Proxy`](Proxy)s to a `ClientBuilder`.
//! ** NOTE ** Proxies are enabled by default.
//!
//! ** NOTE** System proxies will be used in the next breaking change.
//! System proxies look in environment variables to set HTTP or HTTPS proxies.
//!
//! `HTTP_PROXY` or `http_proxy` provide http proxies for http connections while
//! `HTTPS_PROXY` or `https_proxy` provide HTTPS proxies for HTTPS connections.
//!
//! These can be overwritten by adding a [`Proxy`](Proxy) to `ClientBuilder`
//! i.e. `let proxy = reqwest::Proxy::http("https://secure.example")?;`
//! or disabled by calling `ClientBuilder::no_proxy()`.
//!
//! ## TLS
//!