BaseApplicationResponse

Constructors

Link copied to clipboard
constructor(call: PipelineCall)

Types

Link copied to clipboard

Content's body size doesn't match the provided one in Content-Length header

Link copied to clipboard

Content's body size doesn't match the provided one in Content-Length header

Link copied to clipboard
object Companion
Link copied to clipboard

OutgoingContent is trying to set some header that is not allowed for this content type. For example, only upgrade content can set Upgrade header.

Link copied to clipboard

Thrown when there was already response sent but we are trying to respond again

Properties

Link copied to clipboard
override val call: PipelineCall

An PipelineCall instance this PipelineResponse is attached to.

Link copied to clipboard
open override val cookies: ResponseCookies

Provides access to cookies for this response.

Link copied to clipboard
abstract val headers: ResponseHeaders

Provides access to headers for the current response.

Link copied to clipboard
open override val isCommitted: Boolean

Indicates that this response is already committed and no further changes are allowed.

Link copied to clipboard
override var isSent: Boolean

Indicates that this response is already fully sent to the client.

Link copied to clipboard

A pipeline for sending content.

Link copied to clipboard

A type of response object that is passed in the respond function. Can be useful for custom serializations.

Functions

Link copied to clipboard

Appends the Cache-Control header with the specified value to a response.

Link copied to clipboard
fun ApplicationResponse.contentRange(range: LongRange?, fullLength: Long? = null, unit: RangeUnits)
fun ApplicationResponse.contentRange(range: LongRange?, fullLength: Long? = null, unit: String = RangeUnits.Bytes.unitToken)

Appends the Content-Range header with the specified range and fullLength to a response.

Link copied to clipboard

Appends the E-Tag header with the specified value to a response.

Link copied to clipboard

Append response Expires HTTP header value

Link copied to clipboard

Appends a header with the specified name and value to a response.

Append HTTP response header with temporal date (date, time and so on)

Link copied to clipboard

Append response Last-Modified HTTP header value from dateTime

Link copied to clipboard

Append Link header to HTTP response

fun ApplicationResponse.link(uri: String, vararg rel: String)

Append Link header to HTTP response with specified uri and rel

Link copied to clipboard
open override fun push(builder: ResponsePushBuilder)

Produces HTTP/2 push from a server to a client or sets an HTTP/1.x hint header or does nothing. Exact behaviour is up to engine implementation.

Link copied to clipboard
open override fun status(): HttpStatusCode?

Returns a response status code or null if a status code is not set.

open override fun status(value: HttpStatusCode)

Specifies a status code for a response.