Using requests with an Authorization header?

devnzyme1 at use.startmail.com devnzyme1 at use.startmail.com
Tue Jul 28 17:34:59 CEST 2015


Has anyone ever used an authorization header with the requests library?  I tried using:


>>> from requests.auth import HTTPBasicAuth
>>> requests.get('https://api.github.com/user', auth=HTTPBasicAuth('user', 'pass')

from their docs online but that's not working and I don't see anything about authorization headers



http://docs.python-requests.org/en/latest/user/authentication/#basic-authentication




More information about the Python-list mailing list