Answers for "python requests with login"

0

python requests with login

>>> r = requests.get('https://api.github.com/user', auth=('user', 'pass'))
>>> r.status_code
200
>>> r.headers['content-type']
'application/json; charset=utf8'
>>> r.encoding
'utf-8'
>>> r.text
'{"type":"User"...'
>>> r.json()
{'private_gists': 419, 'total_private_repos': 77, ...}
Posted by: Guest on April-27-2021

Code answers related to "python requests with login"

Python Answers by Framework

Browse Popular Code Answers by Language