It also offers an easy way to extract parameters. case Params(params) => Wh" /> It also offers an easy way to extract parameters. case Params(params) => Wh" /> It also offers an easy way to extract parameters. case Params(params) => Wh"/>

Intent that extracts parameters and enforces GET using Unfiltered

310 Views Asked by At

Unfiltered offers an easy way to specify routes.

case GET(Path("/ask")) =>

It also offers an easy way to extract parameters.

case Params(params) =>

What if I want to do both? What is good style for this? I realize I could:

  1. use case req @ GET(Path("/ask")) and use req.parameterValues
  2. match a second time on req
  3. call Params.unapply directly

What should I do?

1

There are 1 best solutions below

0
Eugene Yokota On BEST ANSWER

You can use & like

case GET(UFPath("/int") & Params(params)) =>

See ParamsSpec.scala#L38.