Skip to content

Instantly share code, notes, and snippets.

@hellais
Created November 18, 2012 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hellais/4106075 to your computer and use it in GitHub Desktop.
Save hellais/4106075 to your computer and use it in GitHub Desktop.
from twisted.internet import reactor
from ooni.lib.txagentwithsocks import Agent, Headers
agent = Agent(reactor)
headers = Headers({'SoMeHeader-TEsT': ['antani']})
def done(result):
reactor.stop()
d = agent.request('GET', 'http://127.0.0.1:57001/', headers)
d.addCallback(done)
reactor.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment