Artifact 732291ecbaab15cdec730d1b0c5b0c426821243e:
- File testhttp/testserver.scm — part of check-in [2763433f17] at 2013-01-17 01:04:24 on branch http-transport — Added basic client/server example using spiffy instead of awful (user: matt, size: 597) [annotate] [blame] [check-ins using]
(use spiffy uri-common intarweb spiffy-request-vars) (root-path "/var/www") (vhost-map `(((* any) . ,(lambda (continue) (let (($ (request-vars source: 'both))) (print ($ 'dat)) (if (equal? (uri-path (request-uri (current-request))) '(/ "hey")) (send-response body: "hey there!\n" headers: '((content-type text/plain))) (continue))))))) (start-server port: 12345)