ContextRoutes

org.http4s.ContextRoutes$

Attributes

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

Members list

Concise view

Value members

Concrete methods

def apply[T, F[_]](run: ContextRequest[F, T] => OptionT[F, Response[F]])(implicit F: Monad[F]): ContextRoutes[T, F]

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

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

Attributes

F

the effect of the ContextRoutes

T

the type of the auth info in the ContextRequest accepted by the ContextRoutes

run

the function to lift

Returns:

an ContextRoutes that wraps run

Source:
ContextRoutes.scala
def empty[T, F[_] : Applicative]: ContextRoutes[T, F]

The empty service (all requests fallthrough).

The empty service (all requests fallthrough).

Attributes

T
  • ignored.
Source:
ContextRoutes.scala
def of[T, F[_]](pf: PartialFunction[ContextRequest[F, T], F[Response[F]]])(implicit F: Monad[F]): ContextRoutes[T, F]

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

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

Attributes

F

the base effect of the ContextRoutes

pf

the partial function to lift

Returns:

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

Source:
ContextRoutes.scala
def strict[T, F[_] : Applicative](pf: PartialFunction[ContextRequest[F, T], F[Response[F]]]): ContextRoutes[T, F]

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

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

Attributes

F

the base effect of the ContextRoutes

pf

the partial function to lift

Returns:

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

Source:
ContextRoutes.scala