Update --proxy examples to include URLs to work with Requests v2.0.0..

This commit is contained in:
Jakub Roztocil 2013-09-25 22:02:29 +02:00
parent 2e535d8345
commit 81c99886fd
2 changed files with 7 additions and 6 deletions

View File

@ -547,7 +547,7 @@ protocol (which is included in the value in case of redirects across protocols):
.. code-block:: bash .. code-block:: bash
$ http --proxy=http:10.10.1.10:3128 --proxy=https:10.10.1.10:1080 example.org $ http --proxy=http:http://10.10.1.10:3128 --proxy=https:https://10.10.1.10:1080 example.org
With Basic authentication: With Basic authentication:
@ -565,8 +565,8 @@ In your ``~/.bash_profile``:
.. code-block:: bash .. code-block:: bash
export HTTP_PROXY=10.10.1.10:3128 export HTTP_PROXY=http://10.10.1.10:3128
export HTTPS_PROXY=10.10.1.10:1080 export HTTPS_PROXY=https://10.10.1.10:1080
export NO_PROXY=localhost,example.com export NO_PROXY=localhost,example.com

View File

@ -430,11 +430,12 @@ network.add_argument(
'--proxy', '--proxy',
default=[], default=[],
action='append', action='append',
metavar='PROTOCOL:HOST', metavar='PROTOCOL:PROXY_URL',
type=KeyValueArgType(SEP_PROXY), type=KeyValueArgType(SEP_PROXY),
help=""" help="""
String mapping protocol to the URL of the proxy (e.g. http:foo.bar:3128). String mapping protocol to the URL of the proxy
You can specify multiple proxies with different protocols. (e.g. http:http://foo.bar:3128). You can specify multiple proxies with
different protocols.
""" """
) )