views:

69

answers:

2
+2  Q: 

Lift Req object

+4  A: 

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), "", _)
Alexey Romanov
Hi, thanks for answer, when I wrote all possible requests, I meant just some. Is there a way, how to handle this?
coubeatczech
`case Req(List("api", "expense", eid), "", GetRequest | PostRequest)`
Debilski
+1  A: 

I think you'd have to have a two tier pattern matching. On that would match the Req with any Request and extracts the request, and another that matches the specific request.

David Corbin