[racket] Web server dispatch-rules! bug?

From: Scott Klarenbach (scott at pointyhat.ca)
Date: Wed Jan 16 15:28:42 EST 2013

I'm unable to provide the optional #:method keyword argument when using the
dispatch-rules! function (imperative style).  It works fine in the other
style.

So, for example:

(define-values (main main-url)
  (dispatch-rules
    [("create" "something") #:method "post" (lambda (request)
(do-something))]))

;; works fine, but

(define-container controller (main main-url))
(dispatch-rules! controller [("create" "something") #:method "post" (lambda
(request) (do-something))])

;; fails: dispatch-rules! does not match pattern.

Omitting the #:method param works fine in the second example.

Thanks.

-- 
Talk to you soon,

Scott Klarenbach

PointyHat Software Corp.
www.pointyhat.ca
p 604-568-4280
e scott at pointyhat.ca
#308 - 55 Water St.
Vancouver, BC V6B1A1

_______________________________________
To iterate is human; to recur, divine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130116/0b7da671/attachment.html>

Posted on the users mailing list.