Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard

List of CacheControl known values.

Link copied to clipboard

Concrete OutgoingContent without a payload.

Link copied to clipboard
class HttpResponseReceiveFail(val response: HttpResponse, val cause: Throwable)

Utility class containing response and fail reasons for an HttpResponseReceiveFailed event.

Functions

Link copied to clipboard
fun buildHeaders(block: HeadersBuilder.() -> Unit = {}): Headers

Builds an instance of Headers using the block function.

Link copied to clipboard
expect fun Dispatchers.clientDispatcher(threadCount: Int, dispatcherName: String = "ktor-client-dispatcher"): CoroutineDispatcher

Creates CoroutineDispatcher for client with fixed threadCount and specified dispatcherName.

actual fun Dispatchers.clientDispatcher(threadCount: Int, dispatcherName: String): CoroutineDispatcher

Creates CoroutineDispatcher for client with fixed threadCount and specified dispatcherName.

actual fun Dispatchers.clientDispatcher(threadCount: Int, dispatcherName: String): CoroutineDispatcher

Creates CoroutineDispatcher based on thread pool of threadCount threads.

actual fun Dispatchers.clientDispatcher(threadCount: Int, dispatcherName: String): CoroutineDispatcher

Creates CoroutineDispatcher for client with fixed threadCount and specified dispatcherName.

Link copied to clipboard

If the exception contains cause that differs from CancellationException returns it otherwise returns itself.

If the exception contains cause that differs from CancellationException returns it otherwise returns itself.

If the exception contains cause that differs from CancellationException returns it otherwise returns itself.

If the exception contains cause that differs from CancellationException returns it otherwise returns itself.

Link copied to clipboard

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

Properties

Link copied to clipboard
const val DEFAULT_HTTP_BUFFER_SIZE: Int = 4096

Size of each buffer in the HttpClientDefaultPool.

Link copied to clipboard
const val DEFAULT_HTTP_POOL_SIZE: Int = 1000

Maximum number of buffers to be allocated in the HttpClientDefaultPool.

Link copied to clipboard

Singleton pool of ByteBuffer objects used for HttpClient.

Link copied to clipboard

Occurs after the creation of a new request

Link copied to clipboard

Occurs before sending the request, and after execution of all interceptors.

Link copied to clipboard

Occurs when the response is cancelled due to an exception.

Link copied to clipboard

Occurs after responses headers have been received.

Link copied to clipboard

Occurs when an exception is thrown during receiving of body.