Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #36096
| Date | 2013-01-03 21:12 -0500 |
|---|---|
| From | Ray Cote <rgacote@appropriatesolutions.com> |
| Subject | Re: Missing something obvious with python-requests |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.70.1357265567.2939.python-list@python.org> (permalink) |
Thank you.
--Ray
----- Original Message -----
From: "Barry Scott" <barry@barrys-emacs.org>
To: "Ray Cote" <rgacote@AppropriateSolutions.com>
Cc: python-list@python.org
Sent: Thursday, January 3, 2013 5:48:52 PM
Subject: Re: Missing something obvious with python-requests
The shipped python library code does not work.
See http://bugs.python.org/issue7291 for patches.
Barry
On 3 Jan 2013, at 18:53, Ray Cote <rgacote@appropriatesolutions.com> wrote:
> 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
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Ray Cote, President
Appropriate Solutions, Inc.
We Build Software
603.924.6079
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Missing something obvious with python-requests Ray Cote <rgacote@appropriatesolutions.com> - 2013-01-03 21:12 -0500
csiph-web