版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_40390825/article/details/82469537
import requests
r = requests.get('http://api.github.com/user',\
auth=('user', 'path'))
r.status_code
r.headers['content-type']
r.encoding
r.text