requests get JSON User-Agent


When our browser sends a requests it identifies itself.

examples/web-client/requests_get_json_ua.py
import requests

res = requests.get('http://httpbin.org/user-agent')
#print(res.headers['content-type'])
#print(res.text)
data = res.json()
print(data)
print(data['user-agent'])