ByteArrayContent

abstract class ByteArrayContent : OutgoingContent

Variant of a OutgoingContent with payload represented as ByteArray

Constructors

<init>

ByteArrayContent()

Variant of a OutgoingContent with payload represented as ByteArray

Inherited Properties

contentLength

open val contentLength: Long?

Specifies content length in bytes for this resource.

contentType

open val contentType: ContentType?

Specifies ContentType for this resource.

headers

open val headers: Headers

Headers to set when sending this content

status

open val status: HttpStatusCode?

Status code to set when sending this content

Functions

bytes

abstract fun bytes(): ByteArray

Provides ByteArray which engine will send to peer

Inherited Functions

getProperty

open fun <T : Any> getProperty(key: AttributeKey<T>): T?

Gets an extension property for this content

setProperty

open fun <T : Any> setProperty(
    key: AttributeKey<T>,
    value: T?
): Unit

Sets an extension property for this content

Inheritors

ByteArrayContent

class ByteArrayContent : ByteArrayContent

Implementation of the OutgoingContent.ByteArrayContent for sending array of bytes

FormDataContent

class FormDataContent : ByteArrayContent

OutgoingContent with for application/x-www-form-urlencoded formatted request.

TextContent

class TextContent : ByteArrayContent

Represents a text content that could be sent