Files
kapow/doc/redirecting_a_url.rst
Roberto Abdelkader Martínez Pérez 850baf95f7 Fix example redirecting_a_url. PEBKAC
2019-11-20 11:33:56 +01:00

13 lines
354 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
kapow set /response/headers/Location 'http://example.org'
kapow set /response/status 301