OrElse

krop.route.Response.OrElse
final case class OrElse[A, B](left: Response[A], right: Response[B]) extends Response[Either[A, B]]

Attributes

Source
Response.scala

Members list

Value members

Inherited methods

def orElse[B](that: Response[B]): Response[Either[A, B]]

Produce this Response if given Left[A], otherwise produce that Response given Right[B].

Produce this Response if given Left[A], otherwise produce that Response given Right[B].

Attributes

Inherited from:
Response
Source
Response.scala

Produce this Response if given Some[A], otherwise produce a 404 Response.

Produce this Response if given Some[A], otherwise produce a 404 Response.

Attributes

Inherited from:
Response
Source
Response.scala

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product
def respond(request: Request[IO], value: Either[A, B])(using runtime: KropRuntime): IO[Response[IO]]

Attributes

Inherited from:
Response
Source
Response.scala
def withHeader(header: ToRaw, headers: ToRaw*): Response[A]

Add headers to this Response. The headers can be any form that org.http4s.Header.ToRaw accepts, which is:

Add headers to this Response. The headers can be any form that org.http4s.Header.ToRaw accepts, which is:

  • A value of type A which has a Header[A] in scope
  • A (name, value) pair of String, which is treated as a Recurring header
  • A Header.Raw
  • A Foldable (List, Option, etc) of the above.

Attributes

Inherited from:
Response
Source
Response.scala