HttpApp

org.http4s.HttpApp$
object HttpApp

Functions for creating HttpApp kleislis.

Attributes

Source:
HttpApp.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
HttpApp.type

Members list

Concise view

Value members

Concrete methods

def apply[F[_] : Monad](run: Request[F] => F[Response[F]]): HttpApp[F]

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

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

Attributes

F

the effect of the HttpApp.

run

the function to lift

Returns:

an HttpApp that wraps run

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

Lifts an effectful Response into an HttpApp.

Lifts an effectful Response into an HttpApp.

Attributes

F

the effect of the HttpApp

fr

the effectful Response to lift

Returns:

an HttpApp that always returns fr

Source:
HttpApp.scala
def local[F[_]](f: Request[F] => Request[F])(fa: HttpApp[F])(implicit F: Monad[F]): HttpApp[F]

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.

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.

Attributes

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

Source:
HttpApp.scala

An app that always returns 404 Not Found.

An app that always returns 404 Not Found.

Attributes

Source:
HttpApp.scala
def pure[F[_] : Applicative](r: Response[F]): HttpApp[F]

Lifts a Response into an HttpApp.

Lifts a Response into an HttpApp.

Attributes

F

the effect of the HttpApp

r

the Response to lift

Returns:

an Http that always returns r in effect F

Source:
HttpApp.scala