OutgoingContent
sealed class OutgoingContent
Information about the content to be sent to the peer, recognized by a client or server engine
Types
abstract class ByteArrayContent : OutgoingContent Variant of a OutgoingContent with payload represented as ByteArray |
|
abstract class NoContent : OutgoingContent Variant of a OutgoingContent without a payload |
|
abstract class ProtocolUpgrade : OutgoingContent Variant of a OutgoingContent for upgrading an HTTP connection |
|
abstract class ReadChannelContent : OutgoingContent Variant of a OutgoingContent with payload read from ByteReadChannel |
|
abstract class WriteChannelContent : OutgoingContent Variant of a OutgoingContent with payload written to ByteWriteChannel |
Properties
open val contentLength: Long? Specifies content length in bytes for this resource. |
|
open val contentType: ContentType? Specifies ContentType for this resource. |
|
open val headers: Headers Headers to set when sending this content |
|
open val status: HttpStatusCode? Status code to set when sending this content |
Functions
open fun <T : Any> getProperty(key: AttributeKey<T>): T? Gets an extension property for this content |
|
open fun <T : Any> setProperty( Sets an extension property for this content |
Extension Properties
var OutgoingContent.caching: CachingOptions? Gets or sets CacheControl instance as an extension property on this content |
|
val OutgoingContent. Retrieves LastModified and ETag versions from this OutgoingContent headers |
|
var OutgoingContent.versions: List<Version> Gets or sets list of Version instances as an extension property on this content |
Extension Functions
suspend fun OutgoingContent.toByteArray(): ByteArray |
|
suspend fun OutgoingContent.toByteReadPacket(): ByteReadPacket |
|
fun OutgoingContent.wrapHeaders( Generates a new OutgoingContent of the same abstract type but with OutgoingContent.headers transformed by the specified block. |
Inheritors
abstract class ByteArrayContent : OutgoingContent Variant of a OutgoingContent with payload represented as ByteArray |
|
abstract class NoContent : OutgoingContent Variant of a OutgoingContent without a payload |
|
abstract class ProtocolUpgrade : OutgoingContent Variant of a OutgoingContent for upgrading an HTTP connection |
|
abstract class ReadChannelContent : OutgoingContent Variant of a OutgoingContent with payload read from ByteReadChannel |
|
abstract class WriteChannelContent : OutgoingContent Variant of a OutgoingContent with payload written to ByteWriteChannel |