Back
So I as of late discovered this extraordinary library for dealing with HTTP requests in Python; Chech here.
I love working with it, however, I can't sort out some way to add headers to my get demands. Help?
As per the API, the headers would all be able to be passed in utilizing requests.get:
import requestsr=requests.get("http://www.example.com/", headers={"content-type":"text"})
import requests
r=requests.get("http://www.example.com/", headers={"content-type":"text"})
Interested to learn python in detail? Come and Join the python course.
31k questions
32.8k answers
501 comments
693 users