← Back to Kairo Docs|API Reference (Dokka)

RestEndpointTemplate

data class RestEndpointTemplate(val method: HttpMethod, val path: RestEndpointTemplatePath, val query: RestEndpointTemplateQuery, val contentType: ContentType?, val accept: ContentType?)

A REST endpoint template instance represents a specific subclass of RestEndpoint. In fact, it can be created from a RestEndpoint class reference using RestEndpointTemplate.from.

Constructors

Link copied to clipboard
constructor(method: HttpMethod, path: RestEndpointTemplatePath, query: RestEndpointTemplateQuery, contentType: ContentType?, accept: ContentType?)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val accept: ContentType?
Link copied to clipboard
val contentType: ContentType?
Link copied to clipboard
val method: HttpMethod
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Converts the template path to Ktor's route format (for example "/users/{userId}").

Link copied to clipboard
open override fun toString(): String