Package io.ktor.client.utils

Types

ByteBufferPool

class ByteBufferPool : DefaultPool<ByteBuffer>

CacheControl

object CacheControl

List of CacheControl known values.

EmptyContent

object EmptyContent : NoContent

Concrete OutgoingContent without a payload.

Properties

DEFAULT_HTTP_BUFFER_SIZE

const val DEFAULT_HTTP_BUFFER_SIZE: Int

Size of each buffer in the HttpClientDefaultPool.

DEFAULT_HTTP_POOL_SIZE

const val DEFAULT_HTTP_POOL_SIZE: Int

Maximum number of buffers to be allocated in the HttpClientDefaultPool.

HTTP_CLIENT_DEFAULT_DISPATCHER

val HTTP_CLIENT_DEFAULT_DISPATCHER: CoroutineDispatcher

HTTP_CLIENT_THREAD_COUNT

val HTTP_CLIENT_THREAD_COUNT: Int

HttpClientDefaultPool

val HttpClientDefaultPool: ByteBufferPool

Singleton pool of ByteBuffer objects used for HttpClient.

Functions

buildHeaders

fun buildHeaders(
    block: HeadersBuilder.() -> Unit = {}
): Headers

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.