demo_requests_post_cert.py:
import requests url = 'https://begtut.com/python/demopage.php' myobj = {'somekey': 'somevalue'} #specify a cert to use as a client side certificate by setting the 'cert' parameter: x = requests.post(url, data = myobj, cert='folder/myclient.cert') print(x.status_code)
➜ begtut>python demo_requests_post_cert.py
200