Skip to main content

//clika-runtime/io.clika.runtime/ServerResponse

ServerResponse

[common]
class ServerResponse

A response a handler answers, built by a factory and chained with withHeader / withCookie. Returning it from a handler consumes it; a response never returned is released by close.

Types​

NameSummary
Companion[common]
object Companion

Functions​

NameSummary
close[common]
open fun close()
withCookie[common]
fun withCookie(cookie: Cookie): ServerResponse
Set a cookie (a Set-Cookie header). Returns this for chaining.
withHeader[common]
fun withHeader(name: String, value: String): ServerResponse
Append a header (a name may repeat). Returns this for chaining.