[racket] difference between serve/servlet and serve/dispatch?

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Tue Jun 29 14:39:07 EDT 2010

serve/dispatch sets up the servlet-regexp argument of serve/servlet so
that all URLs go to the dispatch function.

Jay

On Tue, Jun 29, 2010 at 12:20 PM, John Clements
<clements at brinckerhoff.org> wrote:
> I'm puzzled by this function:
>
> (serve/dispatch dispatch) → void
>  dispatch : (request? . -> . response/c)
>
> Calls serve/servlet with appropriate arguments so that every request is handled by dispatch.
>
> Specifically, it appears that serve/dispatch has the same contract (minus all the optional args) that serve/servlet has. How is calling
>
> (serve/dispatch blog-dispatch)
>
> different from calling
>
> (serve/servlet blog-dispatch)
>
> ?
>
>
> John
>
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
>



-- 
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


Posted on the users mailing list.