class RemoteHandler(web.RequestHandler):
@gen.coroutine
def get(self):
response = httpclient('http://HdhCmsTestbaidu测试数据')
self.write(response.body)
@gen.coroutine
def httpClient(url):
result = yield httpclient.AsyncHTTPClient().fetch(url)
return result
查看更多关于Tornado协程在python2.7是怎么使用的?的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did84879