Package-level declarations

Types

Link copied to clipboard

Adds support for type-safe routing using ResourcesCore.

Functions

Link copied to clipboard
inline fun <T : Any> Route.delete(noinline body: suspend PipelineContext<Unit, ApplicationCall>.(T) -> Unit): Route

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

Link copied to clipboard
inline fun <T : Any> Route.get(noinline body: suspend PipelineContext<Unit, ApplicationCall>.(T) -> Unit): Route

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

Link copied to clipboard
inline fun <T : Any> Route.handle(noinline body: suspend PipelineContext<Unit, ApplicationCall>.(T) -> Unit)
fun <T : Any> Route.handle(serializer: KSerializer<T>, body: suspend PipelineContext<Unit, ApplicationCall>.(T) -> Unit)

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

Link copied to clipboard
inline fun <T : Any> Route.head(noinline body: suspend PipelineContext<Unit, ApplicationCall>.(T) -> Unit): Route

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

Link copied to clipboard
inline fun <T : Any> Application.href(resource: T): String
inline fun <T : Any> Application.href(resource: T, urlBuilder: URLBuilder)

Constructs a URL for resource.

Link copied to clipboard
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.

Link copied to clipboard
inline fun <T : Any> Route.patch(noinline body: suspend PipelineContext<Unit, ApplicationCall>.(T) -> Unit): Route
inline fun <T : Any, R : Any> Route.patch(noinline body: suspend PipelineContext<Unit, ApplicationCall>.(T, R) -> Unit): Route

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

Link copied to clipboard
inline fun <T : Any> Route.post(noinline body: suspend PipelineContext<Unit, ApplicationCall>.(T) -> Unit): Route
inline fun <T : Any, R : Any> Route.post(noinline body: suspend PipelineContext<Unit, ApplicationCall>.(T, R) -> Unit): Route

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

Link copied to clipboard
inline fun <T : Any> Route.put(noinline body: suspend PipelineContext<Unit, ApplicationCall>.(T) -> Unit): Route
inline fun <T : Any, R : Any> Route.put(noinline body: suspend PipelineContext<Unit, ApplicationCall>.(T, R) -> Unit): Route

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

Link copied to clipboard
inline fun <T : Any> Route.resource(noinline body: Route.() -> Unit): Route
fun <T : Any> Route.resource(serializer: KSerializer<T>, body: Route.() -> Unit): Route

Registers a route body for a resource defined by the T class.