options

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

Registers a typed handler body for a OPTIONS resource defined by the T class.

A class T must be annotated with io.ktor.resources.Resource.

Parameters

body

receives an instance of the typed resource T as the first parameter.