This patch removes an empt rST code block and changes Request and Response section title from "Objects" to "Req/Resp" to make it easier for users to find documentation for the "req" and "resp" objects passed into responders.
486 B
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_200Request
falcon.Request
Response
falcon.Response