Re: can httplib.HTTPConnection use proxy?

2006-03-17 Thread robert
JuHui wrote: > sorry, would you please give a sample code? > I want to use HTTPConnection to get a html page content via a http > proxy. > thanks. > -> adam and maybe you just want plain GET/POST. use urllib >>> url='http://www.google.ca' >>> urllib.FancyURLopener(proxies={'http':'http://vs

Re: can httplib.HTTPConnection use proxy?

2006-03-16 Thread adam
>>> import httplib >>> h = httplib.HTTPConnection("www.google.ca") >>> h.connect() Traceback (most recent call last): File "", line 1, in ? File "C:\Python24\lib\httplib.py", line 627, in connect raise socket.error, msg error: (10061, 'Connection refused') >>> h2 = httplib.HTTPConnection("m

Re: can httplib.HTTPConnection use proxy?

2006-03-16 Thread JuHui
sorry, would you please give a sample code? I want to use HTTPConnection to get a html page content via a http proxy. thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: can httplib.HTTPConnection use proxy?

2006-03-16 Thread robert
JuHui wrote: > how to use httplib.HTTPConnection with http proxy? > simply connect to the proxy? - and ask using the full url and original Host: - for HTTPS do a CONNECT . Robert -- http://mail.python.org/mailman/listinfo/python-list

can httplib.HTTPConnection use proxy?

2006-03-16 Thread JuHui
how to use httplib.HTTPConnection with http proxy? -- http://mail.python.org/mailman/listinfo/python-list

can httplib.HTTPConnection use proxy?

2006-03-16 Thread JuHui
how to use httplib.HTTPConnection with http proxy? -- http://mail.python.org/mailman/listinfo/python-list