Application
Represents configured and running web application, capable of handling requests. It is also the application coroutine scope that is cancelled immediately at application stop so useful for launching background coroutines.
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Convenience property to access log from application
Link copied to clipboard
Returns first instance of a plugin that implements MDCProvider or default implementation with an empty context
Link copied to clipboard
Link copied to clipboard
Pipeline for receiving content
Link copied to clipboard
Pipeline for sending content
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Called by ApplicationEngine when Application is terminated.
Link copied to clipboard
fun <TEngine : ApplicationEngine, TConfiguration : ApplicationEngine.Configuration> CoroutineScope.embeddedServer(factory: ApplicationEngineFactory<TEngine, TConfiguration>, vararg connectors: EngineConnectorConfig = arrayOf(), watchPaths: List<String> = listOf(WORKING_DIRECTORY_PATH), parentCoroutineContext: CoroutineContext = EmptyCoroutineContext, module: Application.() -> Unit): EmbeddedServer<TEngine, TConfiguration>
Creates an embedded server with the given factory, listening on given connectors.
fun <TEngine : ApplicationEngine, TConfiguration : ApplicationEngine.Configuration> CoroutineScope.embeddedServer(factory: ApplicationEngineFactory<TEngine, TConfiguration>, port: Int = 80, host: String = "0.0.0.0", watchPaths: List<String> = listOf(WORKING_DIRECTORY_PATH), parentCoroutineContext: CoroutineContext = EmptyCoroutineContext, module: Application.() -> Unit): EmbeddedServer<TEngine, TConfiguration>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun intercept(phase: PipelinePhase, block: suspend PipelineContext<Unit, PipelineCall>.(Unit) -> Unit)
Link copied to clipboard
fun interceptorsForPhase(phase: PipelinePhase): List<suspend PipelineContext<Unit, PipelineCall>.(Unit) -> Unit>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Installs a RoutingRoot plugin for the this Application and runs a configuration script on it. You can learn more about routing in Ktor from Routing.