Created
March 21, 2013 19:58
-
-
Save agrif/5216182 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @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