ktor-server-core / io.ktor.http

Package io.ktor.http

Extensions for External Classes

java.time.temporal.Temporal

kotlin.Long

kotlin.String

Properties

httpDateFormat

val httpDateFormat: DateTimeFormatter

Default HTTP date format

httpDateFormat0

val httpDateFormat0: DateTimeFormatter

Default HTTP date format

Functions

expires

fun HeadersBuilder.expires(expires: LocalDateTime): Unit

Set 'Expires` header value from expires

lastModified

fun HeadersBuilder.lastModified(dateTime: ZonedDateTime): Unit

Set 'Last-Modified` header value from dateTime

link

fun ApplicationResponse.link(header: LinkHeader): Unit

Append Link header to HTTP response

fun ApplicationResponse.link(uri: String, vararg rel: String): Unit

Append Link header to HTTP response with specified uri and rel

push

fun ApplicationCall.push(pathAndQuery: String): Unit
fun ApplicationCall.push(encodedPath: String, parameters: Parameters): 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.

fun ApplicationCall.push(block: ResponsePushBuilder.() -> Unit): Unit

Produces HTTP/2 push from server to client or sets HTTP/1.x hint header or does nothing (may call or not call block). Exact behaviour is up to engine implementation.