ApplicationResponse
interface ApplicationResponse
Represents server’s response
Properties
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 |
Functions
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 |
Extension Properties
var ApplicationResponse.responseType: KType? Type of the response object that was passed in respond function. Can be useful for custom serializations. |
Extension Functions
fun ApplicationResponse.cacheControl( Append response |
|
fun ApplicationResponse.contentRange( fun ApplicationResponse.contentRange( Append response |
|
fun ApplicationResponse.etag(value: String): Unit Append response |
|
fun ApplicationResponse.expires(value: LocalDateTime): Unit Append response |
|
fun ApplicationResponse.header( Append HTTP response header with string value fun ApplicationResponse.header( Append HTTP response header with integer numeric value fun ApplicationResponse.header( Append HTTP response header with long integer numeric value fun ApplicationResponse.header( Append HTTP response header with temporal date (date, time and so on) |
|
fun ApplicationResponse.lastModified( Append response |
|
fun ApplicationResponse.link(header: LinkHeader): Unit Append fun ApplicationResponse.link( Append |
Inheritors
abstract class BaseApplicationResponse : ApplicationResponse Base class for implementing an ApplicationResponse |
|
class RoutingApplicationResponse : ApplicationResponse Represents an application response being handled by Routing |