Package io.ktor.server.application.hooks

Types

Link copied to clipboard
object CallFailed : Hook<suspend (call: ApplicationCall, cause: Throwable) -> Unit>

A hook that is invoked when a call fails with an exception.

Link copied to clipboard
object CallSetup : Hook<suspend (ApplicationCall) -> Unit>

A hook that is invoked as a first step in processing a call. Useful for validating, updating a call based on proxy information, etc.

Link copied to clipboard
object Metrics : Hook<suspend (ApplicationCall) -> Unit>

A hook that is invoked before routing and most of the plugins. Useful for metrics, logging, etc.

Link copied to clipboard
class MonitoringEvent<Param : Any, Event>(event: Event) : Hook<(Param) -> Unit>

A shortcut hook for ApplicationEnvironment.monitor subscription.

Link copied to clipboard
object ResponseBodyReadyForSend : Hook<suspend ResponseBodyReadyForSend.Context.(ApplicationCall, <ERROR CLASS>) -> Unit>

A hook that is invoked when a response body comes through all transformations and is ready to be sent.

Link copied to clipboard
object ResponseSent : Hook<(ApplicationCall) -> Unit>

A hook that is invoked when response was successfully sent to a client. Useful for cleaning up opened resources or finishing measurements.