MustacheContent

class MustacheContent(template: String, model: Any?, etag: String?, contentType: ContentType)

Response content which could be used to respond ApplicationCalls like `call.respond(MustacheContent(...))

Parameters

template

name of the template to be resolved by Mustache

model

which is passed into the template

etag

value for E-Tag header (optional)

contentType

response's content type which is set to text/html;charset=utf-8 by default

Constructors

Link copied to clipboard
fun MustacheContent(template: String, model: Any?, etag: String? = null, contentType: ContentType = ContentType.Text.Html.withCharset(Charsets.UTF_8))

Properties

Link copied to clipboard
val contentType: ContentType
Link copied to clipboard
val etag: String? = null
Link copied to clipboard
val model: Any?
Link copied to clipboard
val template: String