Commit af2c28fd authored by Mathieu leclaire's avatar Mathieu leclaire

Route generic paths

parent a70b88ff
...@@ -13,14 +13,16 @@ object Server extends Api { ...@@ -13,14 +13,16 @@ object Server extends Api {
class MyScalatraServlet extends ServertestStack { class MyScalatraServlet extends ServertestStack {
val basePath = "shared"
get("/") { get("/") {
contentType = "text/html" contentType = "text/html"
jade("/default.jade") jade("/default.jade")
} }
post("/shared/Api/hello") { post(s"/$basePath/*") {
Await.result(autowire.Macros.route[Web](Server)( Await.result(autowire.Macros.route[Web](Server)(
autowire.Request(Seq("shared", "Api", "hello"), autowire.Request(Seq(basePath) ++ multiParams("splat").head.split("/"),
upickle.read[Map[String, String]](request.body)) upickle.read[Map[String, String]](request.body))
),100.seconds) ),100.seconds)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment