urlparams in 0.9.0-SNAPSHOT

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

urlparams in 0.9.0-SNAPSHOT

judoole
Can't seem to find an example of how to get "id" from handler. This didn't do the trick:
get("/somepath/:id){
       response.send "The id is: ${urlparams.id}"
}

Is that 0.7 spesific? I see from the Java-example that PathTokens is used for 0.9.0
Reply | Threaded
Open this post in threaded view
|

Re: urlparams in 0.9.0-SNAPSHOT

judoole
Found it...
get("/somepath/:id){
       response.send "The id is: ${pathTokens.id}"
}
Reply | Threaded
Open this post in threaded view
|

Re: urlparams in 0.9.0-SNAPSHOT

Luke Daley
Administrator
Yep, that's the way.