From b1ac4245c81c07fb6b0e014a3cc8046f637d8aff Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Mon, 30 Jul 2012 00:14:34 +1200 Subject: docs: pathod --- libpathod/templates/docs_pathod.html | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'libpathod') diff --git a/libpathod/templates/docs_pathod.html b/libpathod/templates/docs_pathod.html index 194fe473..b5a03023 100644 --- a/libpathod/templates/docs_pathod.html +++ b/libpathod/templates/docs_pathod.html @@ -33,18 +33,17 @@ this, just fire up your browser, and point it to the following URL:

http://localhost:9999

The default crafting anchor point is the path /p/. Anything after -this URL prefix is treated as a response specifier. Hitting the following URL -will generate an HTTP 200 response with 100 bytes of random data:

+this URL prefix is treated as a response specifier. So, hitting the following +URL will generate an HTTP 200 response with 100 bytes of random data:

http://localhost:9999/p/200:b@100

See the language documentation to get (much) -fancier. The pathod daemon also takes a number of configuration options. To -view those, use the command-line help:

+fancier. The pathod daemon also takes a range of configuration options. To view +those, use the command-line help:

./pathod --help
- @@ -53,13 +52,15 @@ view those, use the command-line help:

Anchors

-You can also add anchors to the pathod server that serve a fixed response -whenever a matching URL is requested:

+

Anchors provide an alternative to specifying the response in the URL. +Instead, you attach a response to a pre-configured anchor point, specified with +a regex. When a URL matching the regex is requested, the specified response is +served.

./pathod -a "/foo=200"
-

Here, "/foo" a regex specifying the anchor path, and the part after the "=" is -a response specifier.

+

Here, "/foo" is ithe regex specifying the anchor path, and the part after +the "=" is a response specifier.

@@ -69,6 +70,13 @@ a response specifier.

File Access

+

There are two operators in the language that +load contents from file - the + operator to load an entire request +specification from file, and the > value specifier. In pathod, both +of these operators are restricted to a directory specified at startup, or +disabled if no directory is specified:

+ +
./pathod -d ~/staticdir"
-- cgit v1.2.3