-
Notifications
You must be signed in to change notification settings - Fork 0
Home
suinua edited this page Nov 6, 2018
·
3 revisions
Welcome to the nepuro wiki!
"[:pathVariableName]"
To get path variable value.
@Call.path("pathVariableName") String foo
exmaple↓
@Path.get("/Hello/[:name]")
hello(@Call.path("name") String name){
return Response("Hello $name");
}
Place "r" before the [
and path.
r"/r[RegExp:pathVariableName]"
exmaple↓
@Path.get(r"/Plus/r[\d:first]/r[\d:second]")
plus(@Call.path("first") int first, @Call.path("second") int second) {
return Response.ok("first + second = ${first + second}")..text();
}