handle

inline fun <T : Any> Route.handle(noinline body: suspend PipelineContext<Unit, ApplicationCall>.(T) -> Unit)

Registers a handler body for a location defined by class T.

Class Tmust be annotated with Location.


fun <T : Any> Route.handle(dataClass: KClass<T>, body: suspend PipelineContext<Unit, ApplicationCall>.(T) -> Unit)

Registers a handler body for a location defined by class dataClass.

Class dataClassmust be annotated with Location.

Parameters

body

receives an instance of typed location dataClass as first parameter.