Files
deb-python-falcon/docs/api/request_and_response.rst
2016-10-18 11:03:19 -06:00

486 B

req/resp

Instances of the Request and Response classes are passed into responders as the second and third arguments, respectively.

import falcon


class Resource(object):

    def on_get(self, req, resp):
        resp.body = '{"message": "Hello world!"}'
        resp.status = falcon.HTTP_200

Request

falcon.Request

Response

falcon.Response