ktor-client-core / io.ktor.client.content / ObservableContent

ObservableContent

class ObservableContent : ReadChannelContent

Constructors

<init>

ObservableContent(delegate: OutgoingContent, callContext: <ERROR CLASS>, listener: ProgressListener)

Properties

contentLength

val contentLength: Long?

contentType

val contentType: ContentType?

headers

val headers: Headers

status

val status: HttpStatusCode?

Functions

getProperty

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

readFrom

fun readFrom(): ByteReadChannel

setProperty

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

Extension Functions

wrapHeaders

fun OutgoingContent.wrapHeaders(block: (Headers) -> Headers): OutgoingContent

Generates a new OutgoingContent of the same abstract type but with OutgoingContent.headers transformed by the specified block.