diff --git a/index.html b/index.html index 79ae23b9b4..73e4858584 100644 --- a/index.html +++ b/index.html @@ -265,7 +265,7 @@ object QueryParams extends cask.MainRoutes{ @cask.get("/article/:articleId") // Mandatory query param, e.g. HOST/article/foo?param=bar - def getArticle(articleId: Int, param: String) = { + def getArticle(articleId: Int, param: String) = { s"Article $articleId $param" } @@ -294,6 +294,21 @@ s"User $userName " + params.value } + @cask.get("/statics/foo") + def getStatic() = { + "static route takes precedence" + } + + @cask.get("/statics/:foo") + def getDynamics(foo: String) = { + s"dynamic route $foo" + } + + @cask.get("/statics/bar") + def getStatic2() = { + "another static route" + } + initialize() }