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 = { _, _ -> })
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
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