ValidatingQueryParamDecoderMatcher

org.http4s.dsl.impl.ValidatingQueryParamDecoderMatcher

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  => { ... }
    )

Attributes

Source
Path.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods