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

Popular posts from this blog

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

Why does PHP consider 0 to be equal to a string? -

formula - R: how to pass in a reference to the variable in glm or lm? -