ProtocolUpgrade

abstract class ProtocolUpgrade : OutgoingContent

Variant of a OutgoingContent for upgrading an HTTP connection

Constructors

Link copied to clipboard
fun ProtocolUpgrade()

Functions

Link copied to clipboard
open fun <T : Any> getProperty(key: AttributeKey<T>): T?

Gets an extension property for this content

Link copied to clipboard
open fun <T : Any> setProperty(key: AttributeKey<T>, value: T?)

Sets an extension property for this content

Link copied to clipboard
abstract suspend fun upgrade(input: ByteReadChannel, output: ByteWriteChannel, engineContext: CoroutineContext, userContext: CoroutineContext): Job

Upgrades an HTTP connection

Properties

Link copied to clipboard
open val contentLength: Long?

Specifies content length in bytes for this resource.

Link copied to clipboard
open val contentType: ContentType?

Specifies ContentType for this resource.

Link copied to clipboard
open val headers: Headers

Headers to set when sending this content

Link copied to clipboard
override val status: HttpStatusCode?

Status code to set when sending this content