diff options
| author | Idan Gazit <idan@gazit.me> | 2011-11-19 23:59:27 +0200 |
|---|---|---|
| committer | Idan Gazit <idan@gazit.me> | 2011-11-19 23:59:27 +0200 |
| commit | 1933d3c70768db0e8ed509f683f9b830b6bfc44c (patch) | |
| tree | a4b53c7f8303eee5359329c444964a1ecbaae5c2 /docs/user | |
| parent | 7fdb09b766a84534dadfb56e46033697292cab60 (diff) | |
| download | python-requests-1933d3c70768db0e8ed509f683f9b830b6bfc44c.tar.gz | |
Added support for HTTP Basic Auth credentials in 2-tuple
Diffstat (limited to 'docs/user')
| -rw-r--r-- | docs/user/quickstart.rst | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/docs/user/quickstart.rst b/docs/user/quickstart.rst index cf8d1a71..3a4a91ff 100644 --- a/docs/user/quickstart.rst +++ b/docs/user/quickstart.rst @@ -239,11 +239,15 @@ Making requests with Basic Auth is extremely simple:: >>> requests.get('https://api.github.com/user', auth=HTTPBasicAuth('user', 'pass')) <Response [200]> -OAuth Authentication --------------------- +Due to the prevalence of HTTP Basic Auth, requests provides a shorthand for +this authentication method:: + + >>> requests.get('https://api.github.com/user', auth=('user', 'pass')) + <Response [200]> + +Providing the credentials as a tuple in this fashion is functionally equivalent +to the ``HTTPBasicAuth`` example above. -Miguel Araujo's `requests-oauth <http://pypi.python.org/pypi/requests-oauth>`_ project provides a simple interface for -establishing OAuth connections. Documentation and examples can be found on the requests-oauth `git repository <https://github.com/maraujop/requests-oauth>`_. Digest Authentication --------------------- @@ -256,6 +260,13 @@ Another popular form of web service protection is Digest Authentication:: <Response [200]> +OAuth Authentication +-------------------- + +Miguel Araujo's `requests-oauth <http://pypi.python.org/pypi/requests-oauth>`_ project provides a simple interface for +establishing OAuth connections. Documentation and examples can be found on the requests-oauth `git repository <https://github.com/maraujop/requests-oauth>`_. + + Redirection and History ----------------------- |
