RouteScopedPluginBuilder

Constructors

Link copied to clipboard

Functions

Link copied to clipboard
fun <HookHandler> on(hook: Hook<HookHandler>, handler: HookHandler)

Specifies a handler for a specific hook. A hook can be a specific place in time or event during the request processing like application shutdown, an exception during call processing, etc.

Link copied to clipboard
fun onCall(block: suspend OnCallContext<PluginConfig>.(call: ApplicationCall) -> Unit)

Specifies the block handler for every incoming ApplicationCall.

Link copied to clipboard

Specifies the block handler that allows you to obtain and transform data received from the client. This block is invoked for every attempt to receive the request body.

Link copied to clipboard

Specifies the block handler that allows you to transform data before sending it to the client. This handler is executed when the call.respond function is invoked in a route handler.

Properties

Link copied to clipboard
abstract val application: Application

A reference to the Application where the plugin is installed.

Link copied to clipboard

A configuration of your current application (incl. host, port and anything else you can define in application.conf).

Link copied to clipboard

Allows you to access the environment of the currently running application where the plugin is installed.

Link copied to clipboard

A configuration of the current plugin.

Link copied to clipboard
abstract val route: Route?

A Route to which this plugin was installed. Can be null if plugin in installed into Application.