3
我試圖使用Twisted的ProxyAgent類連接到代理服務器併發出HTTP請求,但服務器需要用戶名和密碼。是否可以使用ProxyAgent將這些憑證指定給服務器?代理用戶名/密碼與扭曲
endpoint = TCP4ClientEndpoint(reactor, host, port)
agent = ProxyAgent(endpoint)
# Maybe need to pass auth credentials in the header here?
body = agent.request("GET", path)