url - Multiple routing parameters in Scotty -
i'm trying use scotty in haskell, , following tutorial, route url so:
get "/hello/:name" $ name <- param "name" text ("hello " <> name <> "!!")
however, syntax capture multiple route parameters? neither of following worked:
post "/newuser/:id/:name" $ id <- param "id" name <- param "name" json $ user {userid = id, username = name} "/users/{id}" $ id <- param "id" json $ filter (matchesid id) allusers
http method part of route matching in scotty. match post
route, have test post
request, or scotty answer 404 http error.
Comments
Post a Comment