Switch to a multi-request/response API to make batching possible.

This commit is contained in:
Ian Gulliver
2014-05-06 13:38:40 -07:00
parent 0369266d60
commit cf05c0f620
6 changed files with 116 additions and 91 deletions

View File

@@ -25,6 +25,16 @@ from cosmopolite import config
from cosmopolite.lib import auth
def expects_json(handler):
@functools.wraps(handler)
def ParseInput(self):
self.request_json = json.load(self.request.body_file)
return handler(self)
return ParseInput
def returns_json(handler):
@functools.wraps(handler)