demo_requests_head_cookies.py:
import requests url = 'https://www.w3schools.com/python/demopage.php' #use the 'cookies' parameter to send cookies to the server: x = requests.head(url, cookies = {"favcolor": "Red"}) print(x.status_code)
C:\Users\My Name>python demo_requests_head_cookies.py
200