OutgoingContent

sealed class OutgoingContent

Information about the content to be sent to the peer, recognized by a client or server engine

Types

Link copied to clipboard
abstract class ByteArrayContent : OutgoingContent

Variant of a OutgoingContent with payload represented as ByteArray

Link copied to clipboard
abstract class NoContent : OutgoingContent

Variant of a OutgoingContent without a payload

Link copied to clipboard
abstract class ProtocolUpgrade : OutgoingContent

Variant of a OutgoingContent for upgrading an HTTP connection

Link copied to clipboard
abstract class ReadChannelContent : OutgoingContent

Variant of a OutgoingContent with payload read from ByteReadChannel

Link copied to clipboard
abstract class WriteChannelContent : OutgoingContent

Variant of a OutgoingContent with payload written to ByteWriteChannel

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
open fun trailers(): Headers?

Trailers to set when sending this content, will be ignored if request is not in HTTP2 mode

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
open val status: HttpStatusCode?

Status code to set when sending this content

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Extensions

Link copied to clipboard
var OutgoingContent.caching: CachingOptions?

Gets or sets the CacheControl instance as an extension property on this content.

Link copied to clipboard
var OutgoingContent.versions: List<Version>

Gets or sets a list of Version instances as an extension property on this content.