pythonimport requests
url = 'http://www.baidu.com'
headers = {'Content-Type': 'application/json'}
r = requests.get(url, headers=headers)
print r.headers['Content-Type']
输出的内容为text/html; charset=utf-8 而不是我设置的application/json
何解?
BTW python2.7.9
添加回答
举报
0/150
提交
取消