[plt-scheme] Requests in plt-web-server

From: Jens Axel Soegaard (jensaxel at soegaard.net)
Date: Thu Feb 21 12:16:11 EST 2008

Jens Axel Soegaard wrote:

One more trick. Also consider using
with-errors-to-browser while developing.

  ;;; post.scm
  (module post
    mzscheme

    (require (lib "servlet.ss" "web-server"))

    (provide start interface-version timeout)

    (define interface-version 'v1)
    (define timeout +inf.0)

    (define (start initial-request)
      (with-errors-to-browser
        (lambda ()
          (print-struct #t)
          (display initial-request)
          (newline)
          (display (request-bindings initial-request))
          (newline)
          (send/finish
          `(html
             (body "POST PAGE"))))))

-- 
Jens Axel Søgaard





Posted on the users mailing list.