demo_requests_delete_headers.py:
import requests url = 'https://begtut.com/try/demopage.html' #use the 'headers' parameter to set the HTTP headers: x = requests.delete(url, headers = {"HTTP_HOST": "MyVeryOwnHost"}) print(x.status_code)
➜ begtut>python demo_requests_delete_headers.py
200