ServletApplicationResponse
abstract class ServletApplicationResponse :
BaseApplicationResponse
Constructors
ServletApplicationResponse( |
Properties
var completed: Boolean |
|
open val headers: ResponseHeaders Headers for this response |
|
val servletResponse: HttpServletResponse |
Inherited Properties
open val ByteBuffer pool |
|
val call: ApplicationCall ApplicationCall instance this ApplicationResponse is attached to |
|
open val cookies: ResponseCookies Cookies for this response |
|
val pipeline: ApplicationSendPipeline Pipeline for sending content |
Functions
abstract fun createResponseJob(): ReaderJob |
|
suspend fun responseChannel(): ByteWriteChannel Get response output channel |
|
open fun setStatus(statusCode: HttpStatusCode): Unit Set underlying engine’s response status |
Inherited Functions
fun commitHeaders(content: OutgoingContent): Unit Commit header values and status and pass them to the underlying engine |
|
open 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. |
|
Respond with bytes content |
|
open suspend fun respondFromChannel( Respond from readChannel |
|
Process response with no content |
|
open suspend fun respondOutgoingContent( Process response outgoing content |
|
abstract suspend fun respondUpgrade( Process upgrade response |
|
open suspend fun respondWriteChannelContent( Process response content using OutgoingContent.WriteChannelContent.writeTo. |
|
open fun status(): HttpStatusCode? Currently set status code for this response, or null if none was set open 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
open class AsyncServletApplicationResponse : |