title: using requests.post to send a request with a certificate
body: <p>I am trying to send some data via a web based api. The client has given me an example snippet of code to test everything.</p>
  
  <p>My problem below is how to use my certificate.</p>
  
  <p>Their example</p>
  
  <pre><code>response = requests.post(url, data=data, headers=headers, cert=('certificate.cer','keyfile.key'))
  </code></pre>
  
  <p>I tried</p>
  
  <pre><code>response = requests.post(url, data=data, headers=headers, cert=('C:\MyPath\My-certs.p12','password'))
  </code></pre>
  
  <p>However I get the error,</p>
  
  <blockquote>
    <p>OSError: Could not find the TLS key file, invalid path: password</p>
  </blockquote>
  
  <p>I have written a C# example and the code works, so I know the certificate and the other pieces are ok. I just can't get the certificate to work in python</p>