Packages

o

org.http4s

HttpApp

object HttpApp

Functions for creating HttpApp kleislis.

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

Value Members

  1. def apply[F[_]](run: (Request[F]) ⇒ F[Response[F]])(implicit arg0: Sync[F]): HttpApp[F]

    Lifts a function into an HttpApp.

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

    F

    the effect of the HttpApp.

    run

    the function to lift

    returns

    an HttpApp that wraps run

  2. def liftF[F[_]](fr: F[Response[F]]): HttpApp[F]

    Lifts an effectful Response into an HttpApp.

    Lifts an effectful Response into an HttpApp.

    F

    the effect of the HttpApp

    fr

    the effectful Response to lift

    returns

    an HttpApp that always returns fr

  3. def local[F[_]](f: (Request[F]) ⇒ Request[F])(fa: HttpApp[F])(implicit F: Sync[F]): HttpApp[F]

    Transforms an HttpApp on its input.

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

    F

    the effect of the HttpApp

    f

    a function to apply to the Request

    fa

    the HttpApp to transform

    returns

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

  4. def notFound[F[_]](implicit arg0: Applicative[F]): HttpApp[F]

    An app that always returns 404 Not Found.

  5. def pure[F[_]](r: Response[F])(implicit arg0: Applicative[F]): HttpApp[F]

    Lifts a Response into an HttpApp.

    Lifts a Response into an HttpApp.

    F

    the effect of the HttpApp

    r

    the Response to lift

    returns

    an Http that always returns r in effect F