Response

zio.http.Response$
See theResponse companion trait
object Response

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Type members

Classlikes

object GetApp

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
GetApp.type
object GetError

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
object Patch

Attributes

Companion:
trait
Graph
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
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Combine
object Empty.type
class SetStatus
Self type

Value members

Concrete methods

def apply(status: Status, headers: Headers, body: Body): Response

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

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

Attributes

data

- stream of data to be sent as Server Sent Events

def fromSocket[R](http: Handler[R, Throwable, WebSocketChannel, Any])(implicit trace: Trace): ZIO[R, Nothing, Response]

Creates a new response for the provided socket

Creates a new response for the provided socket

Attributes

def fromSocketApp[R](app: SocketApp[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

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

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

Creates an empty response with status 200

Creates an empty response with status 200

Attributes

def redirect(location: URL, isPermanent: Boolean): Response

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

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

Attributes

def seeOther(location: URL): Response

Creates an empty response with status 303

Creates an empty response with status 303

Attributes

def status(status: Status): Response

Creates an empty response with the provided Status

Creates an empty response with the provided Status

Attributes

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