ADDED testhttp/testclient.scm Index: testhttp/testclient.scm ================================================================== --- /dev/null +++ testhttp/testclient.scm @@ -0,0 +1,8 @@ +(use http-client) + +(with-input-from-request "http://localhost:12345/hey" + ;; #f + ;; msg + (list (cons 'dat "Testing eh")) + read-string) + ADDED testhttp/testserver.scm Index: testhttp/testserver.scm ================================================================== --- /dev/null +++ testhttp/testserver.scm @@ -0,0 +1,16 @@ +(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) + +