interface ApplicationResponse
Represents server's response
abstract val call: ApplicationCall
ApplicationCall instance this ApplicationResponse is attached to |
|
abstract val cookies: ResponseCookies
Cookies for this response |
|
abstract val headers: ResponseHeaders
Headers for this response |
|
abstract val pipeline: ApplicationSendPipeline
Pipeline for sending content |
abstract fun push(builder: ResponsePushBuilder): Unit
Produces HTTP/2 push from server to client or sets HTTP/1.x hint header or does nothing. Exact behaviour is up to engine implementation. |
|
abstract fun status(): HttpStatusCode?
Currently set status code for this response, or null if none was set abstract fun status(value: HttpStatusCode): Unit
Set status for this response |
var ApplicationResponse.responseType: KType?
Type of the response object that was passed in respond function. Can be useful for custom serializations. |
fun ApplicationResponse.cacheControl(value: CacheControl): Unit
Append response |
|
fun ApplicationResponse.contentRange(range: LongRange?, fullLength: Long? = null, unit: RangeUnits): Unit fun ApplicationResponse.contentRange(range: LongRange?, fullLength: Long? = null, unit: String = RangeUnits.Bytes.unitToken): Unit
Append response |
|
fun ApplicationResponse.etag(value: String): Unit
Append response |
|
fun ApplicationResponse.expires(value: LocalDateTime): Unit
Append response |
|
fun ApplicationResponse.header(name: String, value: String): Unit
Append HTTP response header with string value fun ApplicationResponse.header(name: String, value: Int): Unit
Append HTTP response header with integer numeric value fun ApplicationResponse.header(name: String, value: Long): Unit
Append HTTP response header with long integer numeric value fun ApplicationResponse.header(name: String, date: Temporal): Unit
Append HTTP response header with temporal date (date, time and so on) |
|
fun ApplicationResponse.lastModified(dateTime: ZonedDateTime): Unit
Append response |
|
fun ApplicationResponse.link(header: LinkHeader): Unit
Append fun ApplicationResponse.link(uri: String, vararg rel: String): Unit
Append |
class RoutingApplicationResponse : ApplicationResponse
Represents an application response being handled by Routing |