[plt-scheme] web-server question

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Mon Dec 8 22:43:11 EST 2008

I think you are looking for send/suspend/dispatch:

(send/suspend/dispatch
 (lambda (embed/url)
  (let ([p ....])
   `(a ([href ,(embed/url (lambda (req) (remove-post! p) ....))]) ....)))

http://docs.plt-scheme.org/web-server/web_ss.html#(def._((lib._web-server/servlet/web..ss)._send/suspend/dispatch))

Jay

On Mon, Dec 8, 2008 at 8:01 PM, Karsten Patzwaldt <karsten at patzwaldt.org> wrote:
> Hi.
>
> I'm looking for a convenient way to embed links to certain actions
> into my servlet code. What I want to do is something like this:
>
> (let ((p <get post from somewhere>))
>  `(a ((ref ,(make-url (lambda (request) (remove-post! p) '(html (body
> "Post removed")))))) "Remove post " ,(post-title p)))
>
> That's pretty similar to send/suspend, only that it would work the
> other way round. Does something like this exist in the PLT web server?
>
> Thanks,
>
> Karsten
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>



-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://jay.teammccarthy.org

"The glory of God is Intelligence" - D&C 93


Posted on the users mailing list.