Http

object Http

Functions for creating Http kleislis.

class Object
trait Matchable
class Any

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.

Type Params
F

the effect of the Response returned by the Http

G

the effect of the bodies of the Request and Response

Value Params
run

the function to lift

Returns

an Http that suspends run.

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.

Type Params
F

the effect of the Response returned by the Http

G

the effect of the bodies of the Request and Response

Value Params
fr

the effectful Response to lift

Returns

an Http that always returns fr

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.

Type Params
F

the effect of the Response returned by the Http

G

the effect of the bodies of the Request and Response

Value Params
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

def pure[F[_], G[_]](r: Response[G])(implicit evidence$1: Applicative[F]): Http[F, G]

Lifts a Response into an Http kleisli.

Lifts a Response into an Http kleisli.

Type Params
F

the effect of the Response returned by the Http

G

the effect of the bodies of the Request and Response

Value Params
r

the Response to lift

Returns

an Http that always returns r in effect F