Skip to content

Instantly share code, notes, and snippets.

View lloydXmas's full-sized avatar

Noel Honeybourne lloydXmas

  • Houston, TX
View GitHub Profile
@lloydXmas
lloydXmas / jsonhandler.py
Created May 1, 2018 06:40 — forked from mminer/jsonhandler.py
A JSON request handler for Tornado.
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: