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

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -