← Back to Kairo Docs|API Reference (Dokka)

RestEndpointHandler

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

Functions

Link copied to clipboard
fun auth(auth: suspend AuthReceiver<E>.() -> Unit)

Specifies auth for the endpoint.

Link copied to clipboard
fun authOverriddenBy(auth: suspend AuthReceiver<E>.() -> Unit)

Specifies overriding auth for the endpoint.

Link copied to clipboard
fun handle(handle: suspend HandleReceiver<E>.() -> O)

Specifies the handler for the endpoint.

Link copied to clipboard
fun statusCode(statusCode: suspend StatusCodeReceiver<O>.() -> HttpStatusCode?)

Specifies the HTTP status code to use for the response. If this is not provided or returns null, Ktor's default will apply.