Http

org.http4s.Http$
object Http

Functions for creating Http kleislis.

Attributes

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

Members list

Concise view

Value members

Concrete methods

def apply[F[_], G[_]](run: Request[G] => F[Response[G]])(implicit F: Monad[F]): Http[F, G]

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

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

Attributes

F

the effect of the Response returned by the Http

G

the effect of the bodies of the Request and Response

run

the function to lift

Returns:

an Http that suspends run.

Source:
Http.scala
def liftF[F[_], G[_]](fr: F[Response[G]]): Http[F, G]

Lifts an effectful Response into an Http kleisli.

Lifts an effectful Response into an Http kleisli.

Attributes

F

the effect of the Response returned by the Http

G

the effect of the bodies of the Request and Response

fr

the effectful Response to lift

Returns:

an Http that always returns fr

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

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

Transforms an Http 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 Response returned by the Http

G

the effect of the bodies of the Request and Response

f

a function to apply to the Request

fa

the Http to transform

Returns:

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

Source:
Http.scala
def pure[F[_] : Applicative, G[_]](r: Response[G]): Http[F, G]

Lifts a Response into an Http kleisli.

Lifts a Response into an Http kleisli.

Attributes

F

the effect of the Response returned by the Http

G

the effect of the bodies of the Request and Response

r

the Response to lift

Returns:

an Http that always returns r in effect F

Source:
Http.scala