Response

object Response
Companion:
class
trait Product
trait Mirror
class Object
trait Matchable
class Any

Type members

Classlikes

object Attribute

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from:
Mirror

The name of the type

The name of the type

Inherited from:
Mirror

Value members

Concrete methods

def apply[R, E](status: Status, headers: Headers, data: HttpData): Response
def fromSocket[R, E, A, B](socket: Socket[R, E, A, B])(implicit ev: IsWebSocket[R, E, A, B]): ZIO[R, Nothing, Response]

Creates a new response for the provided socket

Creates a new response for the provided socket

def fromSocketApp[R](app: SocketApp[R]): ZIO[R, Nothing, Response]

Creates a new response for the provided socket app

Creates a new response for the provided socket app

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

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

Creates an empty response with status 200

Creates an empty response with status 200

def redirect(location: CharSequence, 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.

def status(status: Status): Response

Creates an empty response with the provided Status

Creates an empty response with the provided Status

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

Deprecated methods

@deprecated("Use `Response(status, headers, data)` constructor instead.", "22-Sep-2021")
def http[R, E](status: Status, headers: Headers, data: HttpData): Response
Deprecated