org.http4s.dsl
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 service: HttpService = { case GET -> Root / "closest" :? FooMatcher(fooValue) => { fooValue.fold( nelE => BadRequest(nelE.toList.map(_.sanitized).mkString("\n")), foo => { ... } ) }
param extractor using org.http4s.QueryParamDecoder. Note that this will return a ParseFailure if the parameter cannot be decoded.