ValidatingQueryParamDecoderMatcher

abstract class ValidatingQueryParamDecoderMatcher[T](name: String)(`evidence$9`: QueryParamDecoder[T])

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 ValidatingQueryParamDecoderMatcherFoo val routes: HttpRoutes.of = { case GET -> Root / "closest" :? FooMatcher(fooValue) => fooValue.fold( nelE => BadRequest(nelE.toList.map(_.sanitized).mkString("\n")), foo => { ... } ) }}}

class Object
trait Matchable
class Any

Value members

Methods

def unapply(params: Map[String, Seq[String]]): Option[ValidatedNel[ParseFailure, T]]