Skip to content
Myr

use explicit scheme for proxies in the docs

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Issue #1192 tried to force user to provide a scheme for proxy urls. As this would break backwards compability change the docs instead.

authored by Thomas Weißschuh · committed by Thomas Weißschuh · parent d0390d4 · Browse files · 1 file+4 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−4 removed

  • other:+4 added−4 removed

1 file+4 added−4 removed

modified:docs/user/advanced.rst+4 added-4 removed
260 unmodified lines
261262 import requests263264 proxies = {265 "http": "10.10.1.10:3128",266 "https": "10.10.1.10:1080",265 "http": "http://10.10.1.10:3128",266 "https": "http://10.10.1.10:1080",267 }268269 requests.get("http://example.org", proxies=proxies)270271You can also configure proxies by environment variables ``HTTP_PROXY`` and ``HTTPS_PROXY``.272273::274275 $ export HTTP_PROXY="10.10.1.10:3128"276 $ export HTTPS_PROXY="10.10.1.10:1080"275 $ export HTTP_PROXY="http://10.10.1.10:3128"276 $ export HTTPS_PROXY="http://10.10.1.10:1080"277 $ python278 >>> import requests279 >>> requests.get("http://example.org")280
225 unmodified lines