ktor-locations / io.ktor.locations / io.ktor.application.ApplicationCall

Extensions for io.ktor.application.ApplicationCall

locationOrNull

fun <T : Any> ApplicationCall.locationOrNull(): T

Retrieves the current call's location or null if it is not available (request is not handled by a location class), or not yet available (invoked too early before the locations feature takes place).

locations

val ApplicationCall.locations: Locations

Gets the Application.locations feature

url

fun ApplicationCall.url(location: Any, block: URLBuilder.() -> Unit = {}): String

Constructs a String with the url of a instance location whose class must be annotated with Location.