Explore Courses Blog Tutorials Interview Questions
0 votes
in Python by (16.4k points)

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? 

1 Answer

0 votes
by (26.4k points)

As per the API, the headers would all be able to be passed in utilizing requests.get:

import requests

r=requests.get("", headers={"content-type":"text"})

Interested to learn python in detail? Come and Join the python course.

Browse Categories