Add routes for /request/version and /request/remote in data server. Add resource tree documentation for /request/version and /request/remote. Closes #85

This commit is contained in:
Héctor Hurtado
2020-09-09 12:45:18 +02:00
parent fc19b921be
commit 774b9202b5
2 changed files with 46 additions and 0 deletions
+44
View File
@@ -101,6 +101,28 @@ then, when handling the request:
kapow.example
``/request/version`` Resource
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The HTTP version of the incoming request.
Sample Usage
^^^^^^^^^^^^
If the user runs:
.. code-block:: console
$ curl --http1.0 http://kapow.example:8080
then, when handling the request:
.. code-block:: console
$ kapow get /request/version
HTTP/1.0
``/request/path`` Resource
~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -123,6 +145,28 @@ then, when handling the request:
/foo/bar
``/request/remote`` Resource
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The IP address of the host making the incoming 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 /request/remote
192.168.100.156
``/request/matches/<name>`` Resource
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~