HttpServerResponse

data class HttpServerResponse(val body: Any = "", val headers: Headers = Headers(), val contentType: ContentType? = null, val cookies: List<Cookie> = emptyList(), val status: HttpStatus = NOT_FOUND, val onConnect: WsServerSession.() -> Unit = {}, val onBinary: WsServerSession.(data: ByteArray) -> Unit = {}, val onText: WsServerSession.(text: String) -> Unit = {}, val onPing: WsServerSession.(data: ByteArray) -> Unit = {}, val onPong: WsServerSession.(data: ByteArray) -> Unit = {}, val onClose: WsServerSession.(status: WsCloseStatus, reason: String) -> Unit = { _, _ -> }) : HttpResponse

Constructors

Link copied to clipboard
fun HttpServerResponse(body: Any = "", headers: Headers = Headers(), contentType: ContentType? = null, cookies: List<Cookie> = emptyList(), status: HttpStatus = NOT_FOUND, onConnect: WsServerSession.() -> Unit = {}, onBinary: WsServerSession.(data: ByteArray) -> Unit = {}, onText: WsServerSession.(text: String) -> Unit = {}, onPing: WsServerSession.(data: ByteArray) -> Unit = {}, onPong: WsServerSession.(data: ByteArray) -> Unit = {}, onClose: WsServerSession.(status: WsCloseStatus, reason: String) -> Unit = { _, _ -> })

Functions

Link copied to clipboard
open fun bodyString(): String
Link copied to clipboard
open fun cookiesMap(): Map<String, Cookie>

Properties

Link copied to clipboard
open override val body: Any
Link copied to clipboard
open override val contentType: ContentType? = null
Link copied to clipboard
open override val cookies: List<Cookie>
Link copied to clipboard
open override val headers: Headers
Link copied to clipboard
val onBinary: WsServerSession.(data: ByteArray) -> Unit
Link copied to clipboard
val onClose: WsServerSession.(status: WsCloseStatus, reason: String) -> Unit
Link copied to clipboard
val onConnect: WsServerSession.() -> Unit
Link copied to clipboard
val onPing: WsServerSession.(data: ByteArray) -> Unit
Link copied to clipboard
val onPong: WsServerSession.(data: ByteArray) -> Unit
Link copied to clipboard
val onText: WsServerSession.(text: String) -> Unit
Link copied to clipboard
open override val status: HttpStatus