I typed AsyncHTTPClient
sample code from tornado's website in an interactive python interpreter but the asynchronous HTTP request is never executed.
def handle_request(response):
if response.error:
print "Error:", response.error
else:
print response.body
http_client = AsyncHTTPClient()
http_client.fetch("http://www.google.com/", handle_request)
# handle_request function is never executed (nothing is printed)
Can I use AsyncHTTPClient
not as part of a web server processing?