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 Feature : ApplicationFeature<Application, Routing, Routing>

Installable feature for Routing

Functions

Link copied to clipboard
fun addPhase(phase: PipelinePhase)
Link copied to clipboard
open override 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
suspend fun execute(context: ApplicationCall, subject: Unit)
Link copied to clipboard
fun handle(handler: PipelineInterceptor<Unit, ApplicationCall>)

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

Link copied to clipboard
fun insertPhaseAfter(reference: PipelinePhase, phase: PipelinePhase)
Link copied to clipboard
fun insertPhaseBefore(reference: PipelinePhase, phase: PipelinePhase)
Link copied to clipboard
fun intercept(phase: PipelinePhase, block: suspend PipelineContext<Unit, ApplicationCall>.(Unit) -> Unit)
Link copied to clipboard
suspend fun interceptor(context: PipelineContext<Unit, ApplicationCall>)
Link copied to clipboard
operator fun invoke(body: Route.() -> Unit)

Allows using route instance for building additional routes

Link copied to clipboard
fun merge(from: Pipeline<Unit, ApplicationCall>)
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/features/routing.html#tracing for details

Properties

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

List of child routes for this node

Link copied to clipboard
override val developmentMode: Boolean = false
Link copied to clipboard
val isEmpty: Boolean
Link copied to clipboard
val items: List<PipelinePhase>
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