RoutingPipelineResponse

An application response handled by RoutingRoot.

Constructors

Link copied to clipboard
constructor(call: RoutingPipelineCall, pipeline: ApplicationSendPipeline, engineResponse: PipelineResponse)

Properties

Link copied to clipboard
open override val call: RoutingPipelineCall

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
Link copied to clipboard
open override 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
open override val 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.