PebbleContent

class PebbleContent

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

Parameters

template - name of the template to be resolved by Pebble

model - which is passed into the template

locale - which is used to resolve templates (optional)

etag - value for E-Tag header (optional)

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

Constructors

<init>

PebbleContent(
    template: String,
    model: Map<String, Any>,
    locale: Locale? = null,
    etag: String? = null,
    contentType: ContentType = ContentType.Text.Html.withCharset(Charsets.UTF_8))

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

Properties

contentType

val contentType: ContentType

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

etag

val etag: String?

value for E-Tag header (optional)

locale

val locale: Locale?

which is used to resolve templates (optional)

model

val model: Map<String, Any>

which is passed into the template

template

val template: String

name of the template to be resolved by Pebble