handle
inline fun <T : Any> Route.handle(noinline body: suspend PipelineContext<Unit, ApplicationCall>.(T) -> Unit)
Content copied to clipboard
Registers a handler body for a location defined by the T class.
Class Tmust be annotated with Location.
fun <T : Any> Route.handle(dataClass: KClass<T>, body: suspend PipelineContext<Unit, ApplicationCall>.(T) -> Unit)
Content copied to clipboard
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.