HttpResponse

class HttpResponse(val body: Any = "", val headers: Headers = Headers(), val contentType: ContentType? = null, val cookies: List<Cookie> = emptyList(), val status: Int = NOT_FOUND_404, val reason: String = "", val contentLength: Long = -1L, val onConnect: WsSession.() -> Unit = {}, val onBinary: WsSession.(data: ByteArray) -> Unit = {}, val onText: WsSession.(text: String) -> Unit = {}, val onPing: WsSession.(data: ByteArray) -> Unit = {}, val onPong: WsSession.(data: ByteArray) -> Unit = {}, val onClose: WsSession.(status: Int, reason: String) -> Unit = { _, _ -> }) : HttpResponsePort

Constructors

Link copied to clipboard
constructor(body: Any = "", headers: Headers = Headers(), contentType: ContentType? = null, cookies: List<Cookie> = emptyList(), status: Int = NOT_FOUND_404, reason: String = "", contentLength: Long = -1L, onConnect: WsSession.() -> Unit = {}, onBinary: WsSession.(data: ByteArray) -> Unit = {}, onText: WsSession.(text: String) -> Unit = {}, onPing: WsSession.(data: ByteArray) -> Unit = {}, onPong: WsSession.(data: ByteArray) -> Unit = {}, onClose: WsSession.(status: Int, reason: String) -> Unit = { _, _ -> })

Properties

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

Functions

Link copied to clipboard
open fun bodyString(): String
Link copied to clipboard
open fun cookiesMap(): Map<String, Cookie>
Link copied to clipboard
open operator fun plus(cookie: Cookie): HttpResponsePort
open operator fun plus(headers: Headers): HttpResponsePort
open operator fun plus(header: HttpField): HttpResponsePort
open operator fun plus(cookies: List<Cookie>): HttpResponsePort
Link copied to clipboard
open override fun with(status: Int = this.status, body: Any = this.body, headers: Headers = this.headers, contentType: ContentType? = this.contentType, cookies: List<Cookie> = this.cookies, onConnect: WsSession.() -> Unit = this.onConnect, onBinary: WsSession.(data: ByteArray) -> Unit = this.onBinary, onText: WsSession.(text: String) -> Unit = this.onText, onPing: WsSession.(data: ByteArray) -> Unit = this.onPing, onPong: WsSession.(data: ByteArray) -> Unit = this.onPong, onClose: WsSession.(status: Int, reason: String) -> Unit = this.onClose): HttpResponsePort