Package io.ktor.server.application.hooks
Types
Link copied to clipboard
object CallFailed : Hook<suspend (call: ApplicationCall, cause: Throwable) -> Unit>
Content copied to clipboard
A hook that is invoked when a call fails with an exception.
Link copied to clipboard
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
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>
Content copied to clipboard
A shortcut hook for ApplicationEnvironment.monitor subscription.
Link copied to clipboard
object ResponseBodyReadyForSend : Hook<suspend ResponseBodyReadyForSend.Context.(ApplicationCall, <ERROR CLASS>) -> Unit>
Content copied to clipboard
A hook that is invoked when a response body comes through all transformations and is ready to be sent.
Link copied to clipboard
A hook that is invoked when response was successfully sent to a client. Useful for cleaning up opened resources or finishing measurements.