Re: Twisted: Get Protected HTTPS Page via Proxy with Authentication

2008-09-23 Thread Robert Hancock
This works: # Proxy credentials proxyAuth = base64.encodestring('%s:%s' % (proxy_username, proxy_password)) proxy_authHeader = "Basic " + proxyAuth.strip() # Web site credentials basicAuth = base64.encodestring('%s:%s' % (username, password)) authHea

Twisted: Get Protected HTTPS Page via Proxy with Authentication

2008-09-21 Thread Robert Hancock
from twisted.web import client from twisted.internet import reactor import base64 import sys def printPage(data): print data reactor.stop() def printError(failure): print >> sys.stderr, "Error:", failure.getErrorMessage() reactor.stop() if len(sys.argv) == 4: url = sys.argv[1