How to wrap asynchronous and gen functions together in Tornado?
问题 How to wrap asynchronous and gen functions together in Tornado? My code looks like below, the error is 'Future' object has no attribute 'body'. Did I place the decorators in a wrong way? import tornado.httpclient import tornado.web import tornado.gen import tornado.httpserver import tornado.ioloop class Class1(tornado.web.RequestHandler): @tornado.web.asynchronous def post(self, *args, **kwargs): url = self.get_argument('url', None) response = self.json_fetch('POST', url, self.request.body)