[plt-scheme] Web server dispatcher call wrapper

From: Rommel M. Martinez (ebzzry at gmail.com)
Date: Sat Nov 21 19:38:59 EST 2009

Yes, I'm trying to write test cases.

Ah yes. I also found the test cases in bindings-test.ss.

On Sun, Nov 22, 2009 at 8:19 AM, Jay McCarthy <jay.mccarthy at gmail.com> wrote:
> 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.
>
> Jay
>
> 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
> http://teammccarthy.org/jay
>
> "The glory of God is Intelligence" - D&C 93
>



-- 
Rommel M. Martinez
http://www.bespin.org/~ebzzry


Posted on the users mailing list.