NotFoundController

Default built-in controller which handles 404 Not Found events.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun context(): ApplicationContext
Link copied to clipboard
@Get(value = "/error/notfound", produces = ["text/html", "application/json"])
@Error(status = HttpStatus.NOT_FOUND, global = true)
open suspend override fun handle(request: HttpRequest<out Any>): RawResponse
Link copied to clipboard
suspend fun PageController.html(block: suspend HTML.() -> Unit): RawResponse

Responds to a client with an HTML response, using specified block to build an HTML page via Kotlin's HTML DSL.