Missing something obvious with python-requests

Discussion in 'Python' started by Ray Cote, Jan 3, 2013.

  1. Ray Cote

    Ray Cote Guest

    Hello List:

    I seem to be missing something obvious in terms of using proxies with the requests module.
    I'm using requests 1.4 and Python 2.7. Have tried this on Centos 6 and Windows XP.

    Here's the sample code, right out of the manual:

    import requests

    proxies = {
    'https': '192.168.24.25:8443',
    'http': '192.168.24.25:8443', }

    a = requests.get('http://google.com/', proxies=proxies)


    When I look at the proxy log, I see a GET being performed -- when it should be a CONNECT.
    Does not matter if I try to get http or https google.com.
    Clearly I'm missing something fundamental here.
    But after two days of fiddling with the code and tracing through requests I'm still unclear as to why requests is not using the proxy information.

    Any help (or slap on the side of the head) appreciated.
    Thanks
    --Ray
    Ray Cote, Jan 3, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steven D'Aprano
    Replies:
    2
    Views:
    347
    Dan Christensen
    Feb 20, 2006
  2. Wayne  Wengert

    Missing Something Obvious Here!

    Wayne Wengert, Aug 30, 2003, in forum: ASP General
    Replies:
    0
    Views:
    88
    Wayne Wengert
    Aug 30, 2003
  3. Barry Scott
    Replies:
    0
    Views:
    97
    Barry Scott
    Jan 3, 2013
  4. Ray Cote
    Replies:
    0
    Views:
    95
    Ray Cote
    Jan 4, 2013
  5. Chris Angelico
    Replies:
    2
    Views:
    143
    Chris Angelico
    Jan 4, 2013
Loading...

Share This Page