Changeset 27088 in project


Ignore:
Timestamp:
07/21/12 17:01:59 (9 years ago)
Author:
andyjpb
Message:

Explain how to integrate with spiffy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/spiffy-uri-match

    r18188 r27088  
    3131handler will call the {{continue}} procedure passed by spiffy.
    3232
     33[[uri-match/spiffy]] integrates with spiffy via the vhost-map hooks.
     34
     35<enscript highlight="scheme">
     36(vhost-map `((".*" . ,(lambda (continue) (continue)))))
     37(vhost-map `((".*" . ,(lambda (c) (send-status 200 "TEST")))))
     38(vhost-map `((".*" . ,(uri-match/spiffy `(((/ "") (GET ,(lambda (c) (c)))))))))
     39(vhost-map `((".*" . ,(uri-match/spiffy `(((/ "") (GET ,(lambda (c) (send-status 200 "TEST")))))))))
     40(vhost-map `((".*" . ,(uri-match/spiffy `(((/ "") (GET ,(lambda (c) (send-response
     41                                                                     code: 200
     42                                                                     reason: "OK"
     43                                                                     body: "Hello World!"
     44                                                                     headers: '((content-type text/html)))))))))))
     45</enscript>
     46
    3347
    3448<parameter>(default-response-headers [headers])</parameter>
Note: See TracChangeset for help on using the changeset viewer.