Created
November 27, 2013 08:27
-
-
Save saghul/7672426 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
import erequests | |
import os | |
HTTPBIN_URL = os.environ.get('HTTPBIN_URL', 'http://httpbin.org/') | |
def httpbin(*suffix): | |
"""Returns url for HTTPBIN resource.""" | |
return HTTPBIN_URL + '/'.join(suffix) | |
r = list(erequests.map([erequests.AsyncRequest.get(httpbin('stream/10'), stream=True)], size=2))[0] | |
print r._content_consumed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment