org.http4s.dsl.impl
Capture a query parameter that appears 0 or more times.
case class Foo(i: Int) implicit val fooDecoder: QueryParamDecoder[Foo] = ... implicit val fooParam: QueryParam[Foo] = ... object FooMatcher extends OptionalMultiQueryParamDecoderMatcher[Foo]("foo") val routes = HttpRoutes.of { // matches http://.../closest?foo=2&foo=3&foo=4 case GET -> Root / "closest" :? FooMatcher(Some(Seq(2,3,4))) => ... /* * matches http://.../closest?foo=2&foo=3&foo=4 as well as http://.../closest (no parameters) * or http://.../closest?foo=2 (single occurrence) */ case GET -> Root / "closest" :? FooMatcher(is) => ...
Capture a query parameter that appears 0 or more times.