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

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
final case class Patch(addHeaders: Headers, setStatus: Option[Status])

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Self type

Value members

Concrete methods

def apply[R, E](status: Status, headers: Headers, body: Body): Response
def fromSocket[R](http: Handler[R, Throwable, ChannelEvent[WebSocketFrame, WebSocketFrame], Unit])(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: 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.

Attributes

def seeOther(location: CharSequence): 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