Package-level declarations

Types

Link copied to clipboard
class HttpClient(val engine: HttpClientEngine, userConfig: HttpClientConfig<out HttpClientEngineConfig> = HttpClientConfig()) : CoroutineScope, Closeable

A multiplatform asynchronous HTTP client, which allows you to make requests and handle responses, extend its functionality with plugins, such as authentication, JSON serialization, and so on.

Link copied to clipboard

A mutable HttpClient configuration. Learn more about the client's configuration from Creating and configuring a client.

Link copied to clipboard

A container is searched across dependencies using ServiceLoader to find client implementations. An implementation of this interface provides HTTP client factory and only used to find the default client engine when HttpClient function is called with no particular client implementation specified

Functions

Link copied to clipboard
expect fun HttpClient(block: HttpClientConfig<*>.() -> Unit = {}): HttpClient

Creates an asynchronous HttpClient with the specified block configuration.

Creates an asynchronous HttpClient with the specified HttpClientEngine and optional block configuration. Note that a specific platform may require a specific engine for processing requests. You can learn more about available engines from Engines.

Creates an asynchronous HttpClient with the specified HttpClientEngineFactory and optional block configuration. Note that a specific platform may require a specific engine for processing requests. You can learn more about available engines from Engines.

actual fun HttpClient(block: HttpClientConfig<*>.() -> Unit): HttpClient

Constructs an asynchronous HttpClient using optional block for configuring this client.

actual fun HttpClient(block: HttpClientConfig<*>.() -> Unit): HttpClient

Constructs an asynchronous HttpClient using optional block for configuring this client.

actual fun HttpClient(block: HttpClientConfig<*>.() -> Unit): HttpClient

Constructs an asynchronous HttpClient using optional block for configuring this client.