I am unable to remove default headers sent by Python requests.
These are the default headers which python requests is sending:
User-Agent: python-requests/2.24.0
Accept-Encoding: gzip, deflate
Accept: application/json
Connection: keep-alive
here is my code:
import requests
url = ('http://google.com')
headers = {
'Accept': 'application/json',
'Host': 'google.com'
}
for num_of_res in range(1,10):
print(num_of_res)
response = requests.get((url.format(num_of_res)), headers=headers, verify= False)