def METHOD_NAME(self, *args, **kwargs):
    body = self.request.body
    self.request.jsoncall = True
    if body is not None:
        decoded = body.decode()
        if decoded:
            self.request.body = json.loads(decoded)
    result = method(self, *args, **kwargs)
    if result is not None:
        self.set_header('Content-Type', 'application/json; charset=UTF-8')
        self.write(json.dumps(result, default=json_handler))
    else:
        self.set_header('Content-Type', 'text/plain; charset=UTF-8')
        self.set_status(204)