class ApiHandler(RequestHandler):
@asynchronous
def get(self):
client = AsyncHTTPClient()
client.fetch("https://localhost:9999/leaderboard",
callback=self.on_response)
def on_response(self, response):
body = response.body
self.write(json.load(body))
self.finish()