Routing

class Routing(application: Application) : Route

Root routing node for an Application

Parameters

application

is an instance of Application for this routing

Constructors

Link copied to clipboard
fun Routing(application: Application)

Types

Link copied to clipboard
object Plugin : ApplicationPlugin<Application, Routing, Routing>

Installable plugin for Routing

Functions

Link copied to clipboard
open fun afterIntercepted()
Link copied to clipboard
fun createChild(selector: RouteSelector): Route

Creates a child node in this node with a given selector or returns an existing one with the same selector

Link copied to clipboard
fun handle(handler: <ERROR CLASS><Unit, ApplicationCall>)

Installs a handler into this route which will be called when the route is selected for a call

Link copied to clipboard
suspend fun interceptor(context: <ERROR CLASS><Unit, ApplicationCall>)
Link copied to clipboard
operator fun invoke(body: Route.() -> Unit)

Allows using route instance for building additional routes

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun trace(block: (RoutingResolveTrace) -> Unit)

Register a route resolution trace function. See https://ktor.io/servers/plugins/routing.html#tracing for details

Properties

Link copied to clipboard
val application: Application
Link copied to clipboard
val children: List<Route>

List of child routes for this node

Link copied to clipboard
val developmentMode: Boolean = false
Link copied to clipboard
open val environment: ApplicationEnvironment? = null
Link copied to clipboard
val parent: Route?
Link copied to clipboard
val receivePipeline: ApplicationReceivePipeline

Pipeline for receiving content

Link copied to clipboard
val selector: RouteSelector
Link copied to clipboard
val sendPipeline: ApplicationSendPipeline

Pipeline for sending content