HttpClientEngine

interface HttpClientEngine : CoroutineScope, Closeable

Serves as the base interface for an HttpClient's engine.

An HttpClientEngine represents the underlying network implementation that performs HTTP requests and handles responses. Developers can implement this interface to create custom engines for use with HttpClient.

This interface provides a set of properties and methods that define the contract for configuring, executing, and managing HTTP requests within the engine.

For a base implementation that handles common engine functionality, see HttpClientEngineBase.

Inheritors

Properties

Link copied to clipboard

Provides access to the engine's configuration via HttpClientEngineConfig.

Link copied to clipboard
Link copied to clipboard
abstract val dispatcher: CoroutineDispatcher

Specifies the CoroutineDispatcher for I/O operations in the engine.

Link copied to clipboard

Specifies the set of capabilities supported by this HTTP client engine.

Functions

Link copied to clipboard
expect abstract fun close()
Link copied to clipboard
abstract suspend fun execute(data: HttpRequestData): HttpResponseData

Executes an HTTP request and produces an HTTP response.

Link copied to clipboard
open fun install(client: HttpClient)

Installs the engine into an HttpClient.