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> Routing.delete(noinline body: suspend RoutingContext.(T) -> Unit): Routing

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

Link copied to clipboard
inline fun <T : Any> Routing.get(noinline body: suspend RoutingContext.(T) -> Unit): Routing

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

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

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

Link copied to clipboard
inline fun <T : Any> Routing.head(noinline body: suspend RoutingContext.(T) -> Unit): Routing

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> Routing.options(noinline body: suspend RoutingContext.(T) -> Unit): Routing

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

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

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

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

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

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

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

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

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