Skip to content

Instantly share code, notes, and snippets.

@agrif
Created March 21, 2013 19:58
Show Gist options
  • Select an option

  • Save agrif/5216182 to your computer and use it in GitHub Desktop.

Select an option

Save agrif/5216182 to your computer and use it in GitHub Desktop.
@flowerpot.inlineFutures
def main():
_, prot = yield flowerpot.create_connection(HTTPProtocol.with_host('www.google.com'), 'www.google.com', 80)
code, status, headers, data = yield prot.send_request('get', '/', {'Connection' : 'close'})
print(code, status, len((yield data.read())))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment