demo_requests_head_cert.py:
import requests url = 'https://www.begtut.com/python/demopage.htm' #specify a cert to use as a client side certificate by setting the 'cert' parameter: x = requests.head(url, cert='folder/myclient.cert') print(x.status_code)
➜ begtut>python demo_requests_head_cert.py
200