How to use https connection in python?
<p>I have this simple working curl command:</p>

<pre class="lang-none prettyprint-override"><code>curl -k -d X-User=user -d X-Password=password https://12.12.12.21
</code></pre>

<p>This is my example:</p>

<pre><code>import urllib2
opener = urllib2.build_opener()
opener.addheaders = [('X-User', 'user'),('X-Password', 'password')]
rr = opener.open("https://12.12.12.21")
print rr.read()
</code></pre>

<p>It's not working as i expected ( result: wrong password/user name ), can you help me understand why?</p>
