Package io.ktor.http

Functions

Link copied to clipboard
fun HeadersBuilder.expires(expires: LocalDateTime)

Set 'Expires` header value from expires

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

Parse HTTP date to ZonedDateTime

Link copied to clipboard
@JvmName(name = "fromHttpDateString")
fun String.fromHttpDateString0(): ZonedDateTime

Parse HTTP date to ZonedDateTime

Link copied to clipboard
fun HeadersBuilder.lastModified(dateTime: ZonedDateTime)

Set 'Last-Modified` header value from dateTime

Link copied to clipboard
fun ApplicationResponse.link(header: LinkHeader)

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, parameters: Parameters)

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 Temporal.toHttpDateString(): String

Format as HTTP date (GMT)

fun Long.toHttpDateString(): String

Format epoch milliseconds as HTTP date (GMT)

Link copied to clipboard
@JvmName(name = "toHttpDateString")
fun Temporal.toHttpDateString0(): String

Format as HTTP date (GMT)

Properties

Link copied to clipboard
val httpDateFormat: DateTimeFormatter

Default HTTP date format

Link copied to clipboard
@get:JvmName(name = "getHttpDateFormat")
val httpDateFormat0: DateTimeFormatter

Default HTTP date format