Add route/id resource. Closes #10

This commit is contained in:
Héctor Hurtado
2020-09-09 13:27:30 +02:00
parent 774b9202b5
commit 6c3bee9ae0
4 changed files with 87 additions and 8 deletions
+25 -2
View File
@@ -12,8 +12,6 @@ to compose the response.
We access the resource tree easily with the ``kapow set`` and ``kapow get``
subcommands.
.. // DOING #10: /route/id
.. // DOING #113: /request/ssl/client/i/dn
Overview
@@ -45,6 +43,9 @@ Overview
│ │ └──── content The contents of the file uploaded in the form field <name>
│ └──── body HTTP request body
│─ route
│ └──── id Id of the route that matched this request.
└─ response
├──── status HTTP status code
├──── headers
@@ -382,6 +383,28 @@ then, when handling the request:
foobar
``/route/id`` Resource
~~~~~~~~~~~~~~~~~~~~~~~~~~
The ID of the original route that matched this request..
Sample Usage
^^^^^^^^^^^^
If the user runs:
.. code-block:: console
$ curl http://kapow.example:8080/
then, when handling the request:
.. code-block:: console
$ kapow get /route/id
ecd5d63f-f28b-11ea-ac55-ec21e5089c1f
``/response/status`` Resource
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~