Response

zio.http.Response
See theResponse companion object
final case class Response(status: Status, headers: Headers, body: Body)

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type

Members list

Value members

Concrete methods

def addCookie(cookie: Response): Response
def addFlash[A](setter: Setter[A]): Response

Adds flash values to the cookie-based flash-scope.

Adds flash values to the cookie-based flash-scope.

Attributes

def collect(implicit trace: Trace): ZIO[Any, Nothing, Response]

Collects the potentially streaming body of the response into a single chunk.

Collects the potentially streaming body of the response into a single chunk.

Any errors that occur from the collection of the body will be caught and propagated to the Body

Attributes

def contentType(mediaType: MediaType): Response
def ignoreBody(implicit trace: Trace): ZIO[Any, Nothing, Response]

Consumes the streaming body fully and then discards it while also ignoring any failures

Consumes the streaming body fully and then discards it while also ignoring any failures

Attributes

def patch(p: Patch)(implicit trace: Trace): Response
def status(status: Status): Response

Sets the status of the response

Sets the status of the response

Attributes

def toHandler(implicit trace: Trace): Handler[Any, Nothing, Any, Response]

Creates an Http from a Response

Creates an Http from a Response

Attributes

override def updateHeaders(update: Headers => Headers)(implicit trace: Trace): Response

Updates the current Headers with new one, using the provided update function passed.

Updates the current Headers with new one, using the provided update function passed.

Attributes

Definition Classes

Inherited methods

final def addHeader(name: CharSequence, value: CharSequence): Response

Attributes

Inherited from:
HeaderModifier
final def addHeader(header: Header): Response

Attributes

Inherited from:
HeaderModifier
final def addHeaders(headers: Headers): Response

Attributes

Inherited from:
HeaderModifier
final def hasContentType(mediaType: MediaType): Boolean

Attributes

Inherited from:
HeaderChecks
final def hasContentType(value: CharSequence): Boolean

Attributes

Inherited from:
HeaderChecks

Attributes

Inherited from:
HeaderChecks

Attributes

Inherited from:
HeaderChecks
final def hasHeader(header: Header): Boolean

Attributes

Inherited from:
HeaderChecks
final def hasHeader(headerType: HeaderType): Boolean

Attributes

Inherited from:
HeaderChecks
final def hasHeader(name: CharSequence): Boolean

Attributes

Inherited from:
HeaderChecks

Attributes

Inherited from:
HeaderChecks

Attributes

Inherited from:
HeaderChecks

Attributes

Inherited from:
HeaderChecks

Attributes

Inherited from:
HeaderChecks
final def header(headerType: HeaderType): Option[headerType.HeaderValue]

Gets a header or returns None if the header was not present or it could not be parsed

Gets a header or returns None if the header was not present or it could not be parsed

Attributes

Inherited from:
HeaderGetters
final def headerOrFail(headerType: HeaderType): Option[Either[String, headerType.HeaderValue]]

Gets a header. If the header is not present, returns None. If the header could not be parsed it returns the parsing error

Gets a header. If the header is not present, returns None. If the header could not be parsed it returns the parsing error

Attributes

Inherited from:
HeaderGetters
final def headers(headerType: HeaderType): Chunk[headerType.HeaderValue]

Attributes

Inherited from:
HeaderGetters

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product
final def rawHeader(headerType: HeaderType): Option[String]

Gets the raw unparsed header value

Gets the raw unparsed header value

Attributes

Inherited from:
HeaderGetters
final def rawHeader(name: CharSequence): Option[String]

Gets the raw unparsed header value

Gets the raw unparsed header value

Attributes

Inherited from:
HeaderGetters
final def removeHeader(name: String): Response

Attributes

Inherited from:
HeaderModifier
final def removeHeader(headerType: HeaderType): Response

Attributes

Inherited from:
HeaderModifier
final def removeHeaders(headers: Set[String]): Response

Attributes

Inherited from:
HeaderModifier
final def setHeaders(headers: Headers): Response

Attributes

Inherited from:
HeaderModifier