Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
httplib in python 2.7 set proxy
import httplib
c = httplib.HTTPSConnection('localhost',8118)
r1 = c.getresponse()
print r1.status,r1.reason
data1 =
print len(data1)

Thanks for posting this. I don't usually dabble with python and it saved me a great deal of time trying to connect through a proxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment