title: Making HTTP requests via Python Requests module not working via proxy where curl does? Why?
body: <p>Using this curl command I am able to get the response I am looking for from Bash</p>
  
  <pre><code>curl -v -u z:secret_key --proxy http://proxy.net:80  \
  -H "Content-Type: application/json" https://service.com/data.json
  </code></pre>
  
  <p><a href="https://stackoverflow.com/questions/8287628/proxies-with-python-requests-module?answertab=active#tab-top">I have already seen this other post on proxies with the Requests module</a> </p>
  
  <p>And it helped me formulate my code in Python but I need to make a request via a proxy. However, even while supplying the proper proxies it isn't working. Perhaps I'm just not seeing something?</p>
  
  <pre><code>&gt;&gt;&gt; requests.request('GET', 'https://service.com/data.json', \
  &gt;&gt;&gt; headers={'Content-Type':'application/json'}, \ 
  &gt;&gt;&gt; proxies = {'http' : "http://proxy.net:80",'https':'http://proxy.net:80'}, \
  &gt;&gt;&gt; auth=('z', 'secret_key'))
  </code></pre>
  
  <p>Furthermore, at the same python console I can use urllib to make a request have it be successful.</p>
  
  <pre><code>&gt;&gt;&gt; import urllib
  &gt;&gt;&gt; urllib.urlopen("http://www.httpbin.org").read()
  ---results---
  </code></pre>
  
  <p>Even trying requests on just a non-https address fails to work.</p>
  
  <pre><code>&gt;&gt;&gt; requests.get('http://www.httpbin.org')
  Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "/Library/Python/2.6/site-packages/requests/api.py", line 79, in get
     return request('get', url, **kwargs)
  File "/Library/Python/2.6/site-packages/requests/api.py", line 66, in request
      prefetch=prefetch
  File "/Library/Python/2.6/site-packages/requests/sessions.py", line 191, in request
      r.send(prefetch=prefetch)
  File "/Library/Python/2.6/site-packages/requests/models.py", line 454, in send
      raise ConnectionError(e)
  requests.exceptions.ConnectionError: Max retries exceeded for url:
  </code></pre>
  
  <p>Requests is so elegant and awesome but how could it be failing in this instance? </p>