Skip to content

Commit

Permalink
Added documentation for shortcut methods on router
Browse files Browse the repository at this point in the history
  • Loading branch information
alexm92 committed Jul 23, 2016
1 parent a76e6b7 commit 29df274
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/web_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,31 @@ Router is any object that implements :class:`AbstractRouter` interface.

:returns: new :class:`PlainRoute` or :class:`DynamicRoute` instance.

.. method:: add_get(path, *args, **kwargs)

Shortcut for adding a GET handler. Calls the :meth:`add_route` with \
``method`` equals to ``'GET'``.

.. method:: add_post(path, *args, **kwargs)

Shortcut for adding a POST handler. Calls the :meth:`add_route` with \
``method`` equals to ``'POST'``.

.. method:: add_put(path, *args, **kwargs)

Shortcut for adding a PUT handler. Calls the :meth:`add_route` with \
``method`` equals to ``'PUT'``.

.. method:: add_patch(path, *args, **kwargs)

Shortcut for adding a PATCH handler. Calls the :meth:`add_route` with \
``method`` equals to ``'PATCH'``.

.. method:: add_delete(path, *args, **kwargs)

Shortcut for adding a DELETE handler. Calls the :meth:`add_route` with \
``method`` equals to ``'DELETE'``.

.. method:: add_static(prefix, path, *, name=None, expect_handler=None, \
chunk_size=256*1024, response_factory=StreamResponse)

Expand Down

0 comments on commit 29df274

Please sign in to comment.