Package io.ktor.server.jte

Types

Link copied to clipboard
class JteConfig

A configuration for the Jte plugin, where the Jte TemplateEngine can be customized.

Link copied to clipboard
class JteContent(template: String, params: Map<String, Any?>, etag: String?, contentType: ContentType)

A response content handled by the Jte plugin.

Functions

Link copied to clipboard
suspend fun ApplicationCall.respondTemplate(template: String, vararg params: Pair<String, Any?>, etag: String? = null, contentType: ContentType = ContentType.Text.Html.withCharset(Charsets.UTF_8))

Responds with the specified template passing params as a vararg of Pair.

suspend fun ApplicationCall.respondTemplate(template: String, params: Map<String, Any?> = emptyMap(), etag: String? = null, contentType: ContentType = ContentType.Text.Html.withCharset(Charsets.UTF_8))

Responds with the specified template passing params.

Properties

Link copied to clipboard
val Jte: ApplicationPlugin<JteConfig>

A plugin that allows you to use jte templates as views within your application. Provides the ability to respond with JteContent. You can learn more from JTE.