EntityResponseGenerator

org.http4s.dsl.impl.EntityResponseGenerator

Helper for the generation of a org.http4s.Response which may contain a body

While it is possible to construct the org.http4s.Response manually, the EntityResponseGenerators offer shortcut syntax to make intention clear and concise.

Attributes

Example

val resp: IO[Response] = Ok("Hello world!")
Source
ResponseGenerator.scala
Graph
Supertypes
class Any
Known subtypes
class FoundOps[F, G]
class MovedPermanentlyOps[F, G]
class MultipleChoicesOps[F, G]
class PermanentRedirectOps[F, G]
class SeeOtherOps[F, G]
class TemporaryRedirectOps[F, G]
class AcceptedOps[F, G]
class AlreadyReportedOps[F, G]
class BadGatewayOps[F, G]
class BadRequestOps[F, G]
class ConflictOps[F, G]
class CreatedOps[F, G]
class ExpectationFailedOps[F, G]
class FailedDependencyOps[F, G]
class ForbiddenOps[F, G]
class GatewayTimeoutOps[F, G]
class GoneOps[F, G]
class IMUsedOps[F, G]
class LengthRequiredOps[F, G]
class LockedOps[F, G]
class LoopDetectedOps[F, G]
class MisdirectedRequestOps[F, G]
class MultiStatusOps[F, G]
class NotAcceptableOps[F, G]
class NotExtendedOps[F, G]
class NotFoundOps[F, G]
class NotImplementedOps[F, G]
class OkOps[F, G]
class PartialContentOps[F, G]
class PayloadTooLargeOps[F, G]
class PaymentRequiredOps[F, G]
class PreconditionFailedOps[F, G]
class RequestTimeoutOps[F, G]
class ServiceUnavailableOps[F, G]
class TooEarlyOps[F, G]
class TooManyRequestsOps[F, G]
class UpgradeRequiredOps[F, G]
class UriTooLongOps[F, G]
Show all

Members list

Value members

Abstract methods

def liftG: FunctionK[G, F]

Attributes

Source
ResponseGenerator.scala

Concrete methods

def apply()(implicit F: Applicative[F]): F[Response[G]]

Attributes

Source
ResponseGenerator.scala
def apply[A](body: G[A])(implicit F: Monad[F], w: EntityEncoder[G, A]): F[Response[G]]

Attributes

Source
ResponseGenerator.scala
def apply[A](body: A, headers: ToRaw*)(implicit F: Applicative[F], w: EntityEncoder[G, A]): F[Response[G]]

Attributes

Source
ResponseGenerator.scala
def headers(header: ToRaw, _headers: ToRaw*)(implicit F: Applicative[F]): F[Response[G]]

Attributes

Source
ResponseGenerator.scala

Inherited methods

def status: Status

Attributes

Inherited from:
ResponseGenerator
Source
ResponseGenerator.scala