This commit is contained in:
Alexis Metaireau 2011-12-07 11:20:05 +01:00
parent 11530eb594
commit 90d0a8a27f

View file

@ -47,9 +47,7 @@ or "path". **name** is the name of the variable causing problem, if any, and
**description** contains a more detailled message. **description** contains a more detailled message.
Let's run this simple service, with `bin/paster serve` and send some queries to Let's run this simple service, with `bin/paster serve` and send some queries to
it: it::
.. code-block:: shell
$ curl -v http://127.0.0.1:5000/service $ curl -v http://127.0.0.1:5000/service
> GET /service HTTP/1.1 > GET /service HTTP/1.1
@ -114,7 +112,7 @@ content-types they can deal with, and this will be checked against the
Let's refine a bit our previous example, by specifying which content-types are Let's refine a bit our previous example, by specifying which content-types are
supported, using the `accept` parameter: supported, using the `accept` parameter:
.. code-block:: .. code-block:: python
@service.get(validator=is_awesome, accept=("application/json", "text/json")) @service.get(validator=is_awesome, accept=("application/json", "text/json"))
def get1(request): def get1(request):