← Back to Kairo Docs|API Reference (Dokka)

Package-level declarations

Types

Link copied to clipboard

Receiver context for REST endpoint handlers. Provides access to the raw Ktor call and the deserialized endpoint.

Link copied to clipboard
interface HasRouting

Implement this interface on Features that define REST endpoints. The routing function is called during Ktor server setup to register routes.

Link copied to clipboard

REST endpoint handlers are invoked for each call to the matching endpoint.

Link copied to clipboard

Receiver context for customizing the HTTP response status code. Return a status code to override Ktor's default, or null to keep it.

Properties

Link copied to clipboard
var Application.json: KairoJson

Functions

Link copied to clipboard
fun <I : Any, O : Any, E : RestEndpoint<I, O>> Route.route(kClass: KClass<E>, block: RestEndpointHandler<O, E>.() -> Unit)

Routes a RestEndpoint with Ktor. The block must specify a handler for the endpoint (RestEndpointHandler.handle).