Skip to content

Commit

Permalink
Merge pull request psf#643 from gwrtheyrn/docs_proxy_auth
Browse files Browse the repository at this point in the history
Added information about HTTP proxy authentication to docs
  • Loading branch information
Kenneth Reitz committed May 30, 2012
2 parents 77a57c0 + d81dfe2 commit 355b971
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions AUTHORS.rst
Expand Up @@ -102,3 +102,4 @@ Patches and Suggestions
- Roman Haritonov <@reclosedev>
- Josh Imhoff <joshimhoff13@gmail.com>
- Arup Malakar <amalakar@gmail.com>
- Danilo Bargen (gwrtheyrn)
15 changes: 13 additions & 2 deletions docs/user/advanced.rst
Expand Up @@ -45,6 +45,7 @@ Any dictionaries that you pass to a request method will be merged with the sessi

All values that are contained within a session are directly available to you. See the :ref:`Session API Docs <sessionapi>` to learn more.


SSL Cert Verification
---------------------

Expand Down Expand Up @@ -293,6 +294,7 @@ To do so, just configure Requests with a stream to write to::
2011-08-17T03:04:23.380175 GET http://httpbin.org/headers
<Response [200]>


Proxies
-------

Expand All @@ -304,8 +306,8 @@ If you need to use a proxy, you can configure individual requests with the
import requests

proxies = {
"http": "10.10.1.10:3128"
"https": "10.10.1.10:1080"
"http": "10.10.1.10:3128",
"https": "10.10.1.10:1080",
}

requests.get("http://example.org", proxies=proxies)
Expand All @@ -320,6 +322,15 @@ You can also configure proxies by environment variables ``HTTP_PROXY`` and ``HTT
>>> import requests
>>> requests.get("http://example.org")

To use HTTP Basic Auth with your proxy, use the `http://user:password@host/` syntax:

::

proxies = {
"http": "http://user:pass@10.10.1.10:3128/",
}


HTTP Verbs
----------

Expand Down

0 comments on commit 355b971

Please sign in to comment.