Package io.ktor.response
Types
interface ApplicationResponse Represents server’s response |
|
open class ApplicationSendPipeline : Server response send pipeline |
|
class DefaultResponsePushBuilder : ResponsePushBuilder HTTP/2 push builder |
|
class ResponseCookies Server’s response cookies |
|
abstract class ResponseHeaders Server’s response headers |
|
interface ResponsePushBuilder HTTP/2 push builder interface |
Annotations
annotation class UseHttp2Push HTTP/2 push is no longer supported by Chrome web browser. Other browsers may discard it at some point. With such browsers, HTTP/2 push will be disabled, therefore using this feature is safe but it will have no effect. On the other hand, this feature is not deprecated and generally it is still allowed to use it, so feel free to opt-in this annotation to eliminate this warning, if you are sure that you need it. For example, it makes sense to use with a non-browser client that for sure supports HTTP/2 push. |
Properties
var ApplicationResponse.responseType: KType? Type of the response object that was passed in respond function. Can be useful for custom serializations. |
Functions
fun ApplicationResponse.cacheControl( Append response fun HeadersBuilder.cacheControl(value: CacheControl): Unit Append |
|
fun HeadersBuilder.contentRange( Append ‘Content-Range` header with specified range and fullLength fun ApplicationResponse.contentRange( fun ApplicationResponse.contentRange( Append response |
|
fun ApplicationCall.defaultTextContentType( Creates a default ContentType based on the given contentType and current call |
|
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 |
|
suspend fun <T : Any> ApplicationCall.respond( suspend fun ApplicationCall. Sends a message as a response suspend fun <T : Any> ApplicationCall.respond( suspend fun ApplicationCall. |
|
suspend fun ApplicationCall.respondBytes( Responds to a client with a raw bytes response, using specified provider to build a byte array suspend fun ApplicationCall.respondBytes( Responds to a client with a raw bytes response, using specified bytes |
|
suspend fun ApplicationCall.respondBytesWriter( Respond with binary content producer. |
|
suspend fun ApplicationCall.respondFile( Responds to a client with a contents of a file with the name fileName in the baseDir folder suspend fun ApplicationCall.respondFile( Responds to a client with a contents of a file |
|
suspend fun ApplicationCall.respondOutputStream( Respond with binary content producer. |
|
suspend fun ApplicationCall.respondRedirect( Responds to a client with a suspend fun ApplicationCall.respondRedirect( Responds to a client with a |
|
suspend fun ApplicationCall.respondText( Responds to a client with a plain text response, using specified text suspend fun ApplicationCall.respondText( Responds to a client with a plain text response, using specified provider to build a text |
|
suspend fun ApplicationCall.respondTextWriter( Respond with text content writer. |