Closed OndrejSpanel closed 8 months ago
This is covered in the docs under Variable Routes
You need
object MinimalApplication extends cask.MainRoutes {
@cask.get("/")
def hello(param: String) = {
s"Hello"
}
initialize()
}
To provide a more complete example, when combined with request, the parameters are listed first:
object MinimalApplication extends cask.MainRoutes {
@cask.get("/")
def hello(param: String, request: cask.Request) = {
s"Hello $param"
}
initialize()
}
I am not able to process even simple requests with query parameters.
Assume request
http://localhost:8080/?param=hi
Following does not work:
The error is:
Not knowing how to fix that, I have tried:
Now I get an error:
I did not find any documentation about query params. I do not see any annotation like
@cask.Cookie
, maybe there is a way, but not documented?