I've seen this way of doing it using Python:
Code: Select all
headers = {'Authorization': 'Basic ' + base64.b64encode('username:password')}
r = requests.get('http://myapi.com', headers=header)
I've also tried passing the auth in the URL:
Code: Select all
r = requests.get('http://username:[email protected]')
Is there a way to implement Basic authentication?