Files
kapow/doc/redirecting_a_url-BROKEN.rst
pancho horrillo b130cfdec7 Add some examples
Note that the example on redirecting a URL is BROKEN.  Possibly a bug in Kapow!
2019-11-19 21:52:10 +01:00

13 lines
379 B
ReStructuredText

Redirecting a URL
=================
The HTTP protocol allows queries to a URL to be redirected to other URL.
We can do them in Kapow! with little effort:
In this example, we read the header ``User-Agent`` and feed it to the response:
.. code-block:: bash
echo -n 302 | kapow set /response/status
echo -n http://foobar-url.example | kapow set /response/headers/Location