source: project/wiki/eggref/4/spiffy-uri-match @ 18188

Last change on this file since 18188 was 18188, checked in by Moritz Heidkamp, 11 years ago

spiffy-uri-match: add a newline after <procedure> so as to please svnwiki's markup parser

File size: 1.2 KB
Line 
1[[tags: egg]]
2
3== spiffy-uri-match
4
5[[toc:]]
6
7=== Description
8
9A library providing integration of [[uri-match]] for [[spiffy]].
10
11=== Author
12
13Moritz Heidkamp
14
15=== Requirements
16
17Requires the [[uri-match]], [[spiffy]], [[uri-common]] and
18[[intarweb]] extensions.
19
20=== Documentation
21
22<procedure>(uri-match/spiffy routes)</procedure>
23
24Returns a procedure suitable for use as a spiffy handler. It will
25match against the HTTP method and URI of the {{current-request}}
26parameter. The {{routes}} argument is passed directly to
27{{make-uri-matcher}} of [[uri-match]] and thus must be in the format
28described there. If a route matches, its handler is called with
29{{current-response}} modified to include the headers given in the
30{{default-response-headers}} parameter. If no route matches, the
31handler will call the {{continue}} procedure passed by spiffy.
32
33
34<parameter>(default-response-headers [headers])</parameter>
35
36A list of headers to be used for all requests handled by handlers
37created through {{uri-match/spiffy}}. Defaults to
38
39  '((content-type #(text/html ((charset . "utf-8"))))
40    (accept-charset utf-8))
41
42<procedure>(redirect-to path #!key (code 302) (headers '()))</procedure>
43
44Convenience procedure for sending redirects relative to the current
45{{server-root-uri}}.
Note: See TracBrowser for help on using the repository browser.