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

How to check data type in C++? -

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

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