title: how to convert curl request (-g) to python requests
body: <p>i have a curl request with option -g its working but i am not able to access that with python requests.</p>
  <pre><code>curl -i -g -k -X POST -d '{&quot;password&quot;: &quot;pwd&quot;, &quot;username&quot;: &quot;test&quot;}' https://ip_address:port/path/to/api
  </code></pre>
  <p>response is success with the details in requested.
  also if i remove -g from above curl thre request is failing so form my app -g is mandatory.</p>
  <pre><code>&gt;&gt;&gt; import requests
  &gt;&gt;&gt; from requests.auth import HTTPBasicAuth
  
  &gt;&gt;&gt; r = requests.post(&quot;https://[ip_address]:port/path/to/api&quot;, auth=(&quot;test&quot;, &quot;pwd&quot;), body='')
  </code></pre>
  <p>error as ssl_cerificate failure.</p>
  <p>how i can work with requests to get my response successfully.</p>