Packages

o

org.http4s

HttpRoutes

object HttpRoutes

Functions for creating HttpRoutes kleislis.

Source
HttpRoutes.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HttpRoutes
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply[F[_]](run: (Request[F]) ⇒ OptionT[F, Response[F]])(implicit arg0: Monad[F]): HttpRoutes[F]

    Lifts a function into an HttpRoutes.

    Lifts a function into an HttpRoutes. The application of run is suspended in F to permit more efficient combination of routes via SemigroupK.

    F

    the effect of the HttpRoutes

    run

    the function to lift

    returns

    an HttpRoutes that wraps run

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. def empty[F[_]](implicit arg0: Applicative[F]): HttpRoutes[F]

    An empty set of routes.

    An empty set of routes. Always responds with OptionT.none.

    F

    the base effect of the HttpRoutes

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. def liftF[F[_]](fr: OptionT[F, Response[F]]): HttpRoutes[F]

    Lifts an effectful Response into an HttpRoutes.

    Lifts an effectful Response into an HttpRoutes.

    F

    the effect of the HttpRoutes

    fr

    the effectful Response to lift

    returns

    an HttpRoutes that always returns fr

  15. def local[F[_]](f: (Request[F]) ⇒ Request[F])(fa: HttpRoutes[F])(implicit arg0: Monad[F]): HttpRoutes[F]

    Transforms an HttpRoutes on its input.

    Transforms an HttpRoutes on its input. The application of the transformed function is suspended in F to permit more efficient combination of routes via SemigroupK.

    F

    the base effect of the HttpRoutes

    f

    a function to apply to the Request

    fa

    the HttpRoutes to transform

    returns

    An HttpRoutes whose input is transformed by f before being applied to fa

  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. def of[F[_]](pf: PartialFunction[Request[F], F[Response[F]]])(implicit arg0: Monad[F]): HttpRoutes[F]

    Lifts a partial function into an HttpRoutes.

    Lifts a partial function into an HttpRoutes. The application of the partial function is suspended in F to permit more efficient combination of routes via SemigroupK.

    F

    the base effect of the HttpRoutes - Defer suspends evaluation of routes, so only 1 section of routes is checked at a time.

    pf

    the partial function to lift

    returns

    An HttpRoutes that returns some Response in an OptionT[F, *] wherever pf is defined, an OptionT.none wherever it is not

  20. def pure[F[_]](r: Response[F])(implicit FO: Applicative[[β$0$]OptionT[F, β$0$]]): HttpRoutes[F]

    Lifts a Response into an HttpRoutes.

    Lifts a Response into an HttpRoutes.

    F

    the base effect of the HttpRoutes

    r

    the Response to lift

    returns

    an HttpRoutes that always returns r in effect OptionT[F, *]

  21. def strict[F[_]](pf: PartialFunction[Request[F], F[Response[F]]])(implicit arg0: Applicative[F]): HttpRoutes[F]

    Lifts a partial function into an HttpRoutes.

    Lifts a partial function into an HttpRoutes. The application of the partial function is not suspended in F, unlike of. This allows for less constraints when not combining many routes.

    F

    the base effect of the HttpRoutes

    pf

    the partial function to lift

    returns

    An HttpRoutes that returns some Response in an OptionT[F, *] wherever pf is defined, an OptionT.none wherever it is not

  22. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped