So I recently stumbled upon this great library for handling HTTP requests in Python; found here http://docs.python-requests.org/en/latest/index.html.
I love working with it, but I can't figure out how to add headers to my get requests. Help?
According to the API, the headers can all be passed in using requests.get
:
r=requests.get("http://www.example.com/", headers={"content-type":"text"})