abstract class ValidatingQueryParamDecoderMatcher[T] extends AnyRef
param extractor using org.http4s.QueryParamDecoder. Note that this will return a ParseFailure if the parameter cannot be decoded.
case class Foo(i: Int) implicit val fooDecoder: QueryParamDecoder[Foo] = ... object FooMatcher extends ValidatingQueryParamDecoderMatcher[Foo]("foo") val routes: HttpRoutes.of = { case GET -> Root / "closest" :? FooMatcher(fooValue) => fooValue.fold( nelE => BadRequest(nelE.toList.map(_.sanitized).mkString("\n")), foo => { ... } )
- Source
- Path.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- ValidatingQueryParamDecoderMatcher
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
- new ValidatingQueryParamDecoderMatcher(name: String)(implicit arg0: QueryParamDecoder[T])
Value Members
- def unapply(params: Map[String, Seq[String]]): Option[ValidatedNel[ParseFailure, T]]