abstract class OptionalMultiQueryParamDecoderMatcher[T] extends AnyRef
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(Validated.Valid(Seq(Foo(2),Foo(3),Foo(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) => ...
- Source
- Path.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- OptionalMultiQueryParamDecoderMatcher
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
- new OptionalMultiQueryParamDecoderMatcher(name: String)(implicit arg0: QueryParamDecoder[T])
Value Members
- def unapply(params: Map[String, Seq[String]]): Option[ValidatedNel[ParseFailure, List[T]]]