Package io.ktor.server.util

Types

Link copied to clipboard
typealias CopyOnWriteHashMap<K, V> = <ERROR CLASS><K, V>

Functions

Link copied to clipboard
fun <ERROR CLASS>.createFromCall(call: ApplicationCall): <ERROR CLASS>

Creates an url using current call's schema, path and parameters as initial

Link copied to clipboard
inline fun <ERROR CLASS>.getOrFail(name: String): String

Get parameters value associated with this name or fail with MissingRequestParameterException

inline fun <R : Any> <ERROR CLASS>.getOrFail(name: String): R

Get parameters value associated with this name converting to type R using DefaultConversionService or fail with MissingRequestParameterException

Link copied to clipboard
inline operator fun <R : Any> <ERROR CLASS>.getValue(thisRef: Any?, property: KProperty<*>): R

Operator function that allows to delegate variables by call parameters. It does conversion to type R using DefaultConversionService

Link copied to clipboard
fun List<String>.normalizePathComponents(): List<String>

Process path components such as . and .., replacing redundant path components including all leading. It also discards all reserved characters and component names that are reserved (such as CON, NUL).

Link copied to clipboard
fun Instant.toGMTDate(): GMTDate

Convert Instant to GMTDate

fun ZonedDateTime.toGMTDate(): GMTDate
Link copied to clipboard
fun Date.toLocalDateTime(): LocalDateTime

Creates LocalDateTime from this Date

Link copied to clipboard
fun Date.toZonedDateTime(): ZonedDateTime

Creates ZonedDateTime from this Date

Link copied to clipboard
fun url(block: <ERROR CLASS>.() -> Unit): String

Construct a URL

inline fun ApplicationCall.url(block: <ERROR CLASS>.() -> Unit = {}): String

Creates an url using current call's schema, path and parameters as initial and then invokes block function on the url builder so amend parameters

Properties

Link copied to clipboard
val GreenwichMeanTime: ZoneId

ZoneId for GMT