[plt-scheme] Web server dispatcher call wrapper

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Sat Nov 21 19:19:04 EST 2009

I don't understand.

Are you trying to write test cases? And you want to make a fake
'request' object? You can just construct them manually based on the
docs in the web-server/http collection.


On Sat, Nov 21, 2009 at 5:06 PM, Rommel M. Martinez <ebzzry at gmail.com> wrote:
> Is there a way to wrap a call to a dispatcher so that it simulates an
> HTTP POST request? For example, if `render-foo' is defined as:
> (define (render-foo request x y)
>  (local [(define (response-generator make-url) ...)]
>    (send/suspend/dispatch response-generator)))
> How can I call `render-foo' like this?
> (with-bindings
>  [(x "foo")
>   (y "bar")]
>  (render-foo request))
> --
> Rommel M. Martinez
> http://www.bespin.org/~ebzzry
> _________________________________________________
>  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

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

Posted on the users mailing list.