Hanlde basic authentication (username, password in header) via
As you can see above you just need to provide
#python #requests #authentication #basic #basic_authentication
requests
in python:>>> from requests.auth import HTTPBasicAuth
>>> requests.get('https://api.github.com/user', auth=HTTPBasicAuth('user', 'pass'))
<Response [200]>
As you can see above you just need to provide
username
& password
in auth
parameter in order to have basic authentication.#python #requests #authentication #basic #basic_authentication