Dear Guilers,

I'd like to implement a web server using the (web server) module, but
allow for “streaming” results.  The way I image this would look like,
is something like this:

(define (request-handler request body)
  (values '((content-type . (text/plain)))
          ;; This function can build its response by writing to
          ;; ‘port’, rather than to return the whole body as a
          ;; string.
          (lambda (port)
            (format port "Hello world!"))))

(run-server request-handler)

Is this possible with the (web server) module?  If so, how?
If not, what would be a good starting point to implement this?

Kind regards,
Roel Janssen

Reply via email to