Package io.ktor.server.http

Functions

Link copied to clipboard
fun String.fromHttpDateString(): ZonedDateTime

Parse HTTP date to ZonedDateTime

Link copied to clipboard
fun ApplicationResponse.link(header: <ERROR CLASS>)

Append Link header to HTTP response

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

Append Link header to HTTP response with specified uri and rel

Link copied to clipboard
fun ApplicationCall.push(block: ResponsePushBuilder.() -> 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.

fun ApplicationCall.push(pathAndQuery: String)
fun ApplicationCall.push(encodedPath: String, encodedParameters: <ERROR CLASS>)

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.

Link copied to clipboard
fun Long.toHttpDateString(): String

Format epoch milliseconds as HTTP date (GMT)

fun Temporal.toHttpDateString(): String

Format as HTTP date (GMT)

Properties

Link copied to clipboard
val httpDateFormat: DateTimeFormatter

Default HTTP date format