Response

zio.http.Response
See theResponse companion class
object Response

Attributes

Companion
class
Source
Response.scala
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Response.type

Members list

Type members

Classlikes

object Patch

Attributes

Companion
trait
Source
Response.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Patch.type
sealed trait Patch

Models the set of operations that one would want to apply on a Response.

Models the set of operations that one would want to apply on a Response.

Attributes

Companion
object
Source
Response.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class AddHeaders
class Combine
object Empty
class SetStatus
Show all
Self type

Inherited and Abstract types

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
Source
Mirror.scala

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

Attributes

Source
Response.scala
def badGateway(message: String): Response

Attributes

Source
Response.scala

Attributes

Source
Response.scala
def badRequest(message: String): Response

Attributes

Source
Response.scala
def error(status: Error, message: String): Response

Attributes

Source
Response.scala
def error(status: Error, body: Body): Response

Attributes

Source
Response.scala
def error(status: Error): Response

Attributes

Source
Response.scala

Attributes

Source
Response.scala
def forbidden(message: String): Response

Attributes

Source
Response.scala
def fromCause(cause: Cause[Any]): Response

Attributes

Source
Response.scala
def fromCause(cause: Cause[Any], config: ErrorResponseConfig): Response

Creates a new response from the specified cause. Note that this method is not polymorphic, but will attempt to inspect the runtime class of the failure inside the cause, if any.

Creates a new response from the specified cause. Note that this method is not polymorphic, but will attempt to inspect the runtime class of the failure inside the cause, if any.

Attributes

Source
Response.scala
def fromCauseWith[E](cause: Cause[E], config: ErrorResponseConfig)(f: E => Response): Response

Creates a new response from the specified cause, translating any typed error to a response using the provided function.

Creates a new response from the specified cause, translating any typed error to a response using the provided function.

Attributes

Source
Response.scala
def fromServerSentEvent[T : Schema](data: ServerSentEvent[T])(implicit evidence$1: Schema[T], trace: Trace): Response

Attributes

Source
Response.scala
def fromServerSentEvents[T : Schema](data: ZStream[Any, Nothing, ServerSentEvent[T]])(implicit evidence$1: Schema[T], trace: Trace): Response

Creates a response with content-type set to text/event-stream

Creates a response with content-type set to text/event-stream

Value parameters

data

- stream of data to be sent as Server Sent Events

Attributes

Source
Response.scala
def fromServerSentEvents[T : Schema](data: Iterable[ServerSentEvent[T]])(implicit evidence$1: Schema[T], trace: Trace): Response

Attributes

Source
Response.scala
def fromSocketApp[R](app: WebSocketApp[R])(implicit trace: Trace): ZIO[R, Nothing, Response]

Creates a new response for the provided socket app

Creates a new response for the provided socket app

Attributes

Source
Response.scala
def fromThrowable(throwable: Throwable): Response

Attributes

Source
Response.scala

Creates a new response for the specified throwable. Note that this method relies on the runtime class of the throwable.

Creates a new response for the specified throwable. Note that this method relies on the runtime class of the throwable.

Attributes

Source
Response.scala

Attributes

Source
Response.scala
def gatewayTimeout(message: String): Response

Attributes

Source
Response.scala
def html(data: Html, status: Status = ...): Response

Creates a response with content-type set to text/html

Creates a response with content-type set to text/html

Attributes

Source
Response.scala
def html(data: Dom): Response

Creates a response with content-type set to text/html

Creates a response with content-type set to text/html

Attributes

Source
Response.scala
def html(data: Dom, status: Status): Response

Creates a response with content-type set to text/html

Creates a response with content-type set to text/html

Attributes

Source
Response.scala

Attributes

Source
Response.scala

Attributes

Source
Response.scala
def json(data: CharSequence): Response

Creates a response with content-type set to application/json

Creates a response with content-type set to application/json

Attributes

Source
Response.scala
def json(data: CharSequence, extraHeaders: Headers): Response

Creates a response with content-type set to application/json and the specified extra headers.

Creates a response with content-type set to application/json and the specified extra headers.

Attributes

Source
Response.scala

Attributes

Source
Response.scala

Attributes

Source
Response.scala
def notExtended(message: String): Response

Attributes

Source
Response.scala

Attributes

Source
Response.scala
def notFound(message: String): Response

Attributes

Source
Response.scala

Attributes

Source
Response.scala
def notImplemented(message: String): Response

Attributes

Source
Response.scala
def ok: Response

Creates an empty response with status 200

Creates an empty response with status 200

Attributes

Source
Response.scala
def redirect(location: URL, isPermanent: Boolean = ...): Response

Creates an empty response with status 307 or 308 depending on if it's permanent or not.

Creates an empty response with status 307 or 308 depending on if it's permanent or not.

Note: if you intend to always redirect a browser with a HTTP GET to the given location you very likely should use Response#seeOther instead.

Attributes

Source
Response.scala
def seeOther(location: URL): Response

Creates an empty response with status 303.

Creates an empty response with status 303.

Attributes

Source
Response.scala

Attributes

Source
Response.scala

Attributes

Source
Response.scala
def status(status: Status): Response

Creates an empty response with the provided Status

Creates an empty response with the provided Status

Attributes

Source
Response.scala
def text(text: CharSequence): Response

Creates a response with content-type set to text/plain

Creates a response with content-type set to text/plain

Attributes

Source
Response.scala
def text(text: CharSequence, extraHeaders: Headers): Response

Creates a response with content-type set to text/plain and the specified extra headers.

Creates a response with content-type set to text/plain and the specified extra headers.

Attributes

Source
Response.scala

Attributes

Source
Response.scala
def unauthorized(message: String): Response

Attributes

Source
Response.scala