From 8a6bdb7a826663573a802eeffe8ae7f3e530e9c1 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Thu, 7 Nov 2019 19:42:48 +0000 Subject: [PATCH] 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 --- src/lib.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index bbbd182..a074788 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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 //!