ValidatingQueryParamDecoderMatcher

abstract class ValidatingQueryParamDecoderMatcher[T](name: String)(implicit evidence$12: 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 ValidatingQueryParamDecoderMatcher[Foo]("foo")
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

Concrete methods