15 lines
568 B
Scheme
15 lines
568 B
Scheme
(module incremental mzscheme
|
|
(require (lib "servlet.ss" "web-server"))
|
|
(provide (all-defined))
|
|
(define interface-version 'v1)
|
|
(define timeout +inf.0)
|
|
(define (start initial-request)
|
|
(send/finish
|
|
(make-response/incremental
|
|
200 "Okay" (current-seconds) #"text/html" '()
|
|
(lambda (output-chunk)
|
|
(output-chunk "<html><head><title>"
|
|
"my-title</title></head>\n")
|
|
(output-chunk "<body><p>The first paragraph</p>\n")
|
|
(sleep 4)
|
|
(output-chunk "<p>The second paragraph</p></body></html>\n")))))) |