close
from tornado.httpclient import AsyncHTTPClient
from tornado.httpclient import HTTPRequest
def printResponse(data):
print(data)
http_client = AsyncHTTPClient()
headers = {'Content-Type': "application/json"}
url = 'https://yourdomain.com'
req = HTTPRequest(url=url,
method='GET',
headers=headers)
resp = yield http_client.fetch(req, printResponse)
https://stackoverflow.com/questions/28405725/how-to-debug-tornado-async-operation
全站熱搜
留言列表