From a0b40cc8aa58c557c30840c906fcba3401bb91cf Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 12 Jan 2009 05:12:57 +0000 Subject: - An interface specific to the HTTP verb (GET/PUT/POST/DELETE/HEAD) is attached to each request object on ingress. The HTTP-verb-related interfaces are defined in ``repoze.bfg.interfaces`` and are ``IGETRequest``, ``IPOSTRequest``, ``IPUTRequest``, ``IDELETERequest`` and ``IHEADRequest``. These interfaces can be specified as the ``request_type`` attribute of a bfg view declaration. A view naming a specific HTTP-verb-matching interface will be found only if the view is defined with a request_type that matches the HTTP verb in the incoming request. The more general ``IRequest`` interface can be used as the request_type to catch all requests (and this is indeed the default). All requests implement ``IRequest``. The HTTP-verb-matching idea was pioneered by `repoze.bfg.restrequest `_ . That package is no longer required, but still functions fine. --- docs/api/interfaces.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 docs/api/interfaces.rst (limited to 'docs/api/interfaces.rst') diff --git a/docs/api/interfaces.rst b/docs/api/interfaces.rst new file mode 100644 index 000000000..e174966a4 --- /dev/null +++ b/docs/api/interfaces.rst @@ -0,0 +1,22 @@ +.. _interfaces_module: + +:mod:`repoze.bfg.interfaces` +============================ + +Request-related interfaces +--------------------------- + +.. automodule:: repoze.bfg.interfaces + + .. autoclass:: IRequest + + .. autoclass:: IGETRequest + + .. autoclass:: IPOSTRequest + + .. autoclass:: IPUTRequest + + .. autoclass:: IDELETERequest + + .. autoclass:: IHEADRequest + -- cgit v1.2.3