diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst index ea8186e..e07d227 100644 --- a/docs/source/quickstart.rst +++ b/docs/source/quickstart.rst @@ -48,6 +48,14 @@ If you want dynamic URLs, you can use Python's familiar *f-string syntax* to dec A ``GET`` request to ``/hello/brettcannon`` will result in a response of ``hello, brettcannon!``. +Type convertors are also available:: + + @api.route("/add/{a:int}/{b:int}") + async def add(req, resp, *, a, b): + resp.text = f"{a} + {b} = {a + b}" + +Supported types: ``str``, ``int`` and ``float``. + Returning JSON / YAML ---------------------