in liftbook, there's an example of creating of a Req instance by using apply :
case Req(List("api", "expense", eid), "", GetRequest) =>
() => showExpense(eid)
but when I look into api documentation, there are two apply() methods, but I don't know which one and how is ran in this example.
Also, is there a way, how to include /a/b
and /a/b/c
requests with one case
?
Also, is there a way, how to enumerate all possible requests in one case
: guess : case Req(List("api", "expense", eid), "", {GetRequest,PostRequest})
?
Thanks for answering.
Judging by case
, this isn't an example of creating a Req
, but an example of pattern matching one.
Also, is there a way, how to enumerate all possible requests in one
case
It should be
case Req(List("api", "expense", eid), "", _)