Files
deb-python-falcon/doc/api/request_and_response.rst
kgriffs c0bb04acbb doc(reference): Remove extraneouse markup
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.
2014-04-09 14:08:05 -05:00

34 lines
486 B
ReStructuredText

.. _request:
Req/Resp
========
Instances of the Request and Response classes are passed into responders as the second
and third arguments, respectively.
.. code:: python
import falcon
class Resource(object):
def on_get(self, req, resp):
resp.body = '{"message": "Hello world!"}'
resp.status = falcon.HTTP_200
Request
-------
.. autoclass:: falcon.Request
:members:
Response
--------
.. autoclass:: falcon.Response
:members: