Package io.ktor.server.html
Types
Link copied to clipboard
class HtmlContent(status: <ERROR CLASS>?, builder: <ERROR CLASS>.() -> Unit)
Content copied to clipboard
Represents an OutgoingContent build using kotlinx.html
.
Link copied to clipboard
A placeholder that is inserted inside TOuter.
Link copied to clipboard
class PlaceholderItem<TOuter>(index: Int, collection: List<PlaceholderItem<TOuter>>) : Placeholder<TOuter>
Content copied to clipboard
An item of a PlaceholderList when it is expanded.
Link copied to clipboard
A placeholder that can be used to insert the content that appears multiple times (for example, list items).
Link copied to clipboard
A placeholder that is also a Template. It can be used to insert child templates and create nested layouts.
Functions
Link copied to clipboard
fun <TOuter, TInner> TOuter.each(items: PlaceholderList<TOuter, TInner>, itemTemplate: TOuter.(PlaceholderItem<TInner>) -> Unit)
Content copied to clipboard
Inserts every element of PlaceholderList.
Link copied to clipboard
Inserts Placeholder.
Link copied to clipboard
suspend fun <ERROR CLASS>.respondHtml(status: <ERROR CLASS> = HttpStatusCode.OK, block: <ERROR CLASS>.() -> Unit)
Content copied to clipboard
Link copied to clipboard
suspend fun <TTemplate : Template<<ERROR CLASS>>> <ERROR CLASS>.respondHtmlTemplate(template: TTemplate, status: <ERROR CLASS> = HttpStatusCode.OK, body: TTemplate.() -> Unit)
Content copied to clipboard
Responds to a client with an HTML response built based on a specified template. You can learn more from HTML DSL.