Skip to content

Instantly share code, notes, and snippets.

View lch277's full-sized avatar

lch277

View GitHub Profile
import json
import tornado.web
class JsonHandler(BaseHandler):
"""Request handler where requests and responses speak JSON."""
def prepare(self):
# Incorporate request JSON into arguments dictionary.
if self.request.body:
try: