KtorHttpClient
class KtorHttpClient(engineFactory: HttpClientEngineFactory<*>? = null, httpClientOptions: HttpClientConfig<*>.() -> Unit = {
defaultRequest {
accept(VndApiJson)
contentType(VndApiJson)
}
}, httpClient: HttpClient = if (engineFactory == null) HttpClient(httpClientOptions) else HttpClient(
engineFactory,
httpClientOptions
)) : HttpClient(source)
A Ktor implementation of the HttpClient interface.
Parameters
engineFactory
The engine factory to use for the HTTP client.
httpClientOptions
The options to pass to the HTTP client.
httpClient
The HTTP client to use. engineFactory and httpClientOptions will be ignored if this is provided. engineFactory will not be used if is null.
Constructors
Link copied to clipboard
constructor(engineFactory: HttpClientEngineFactory<*>? = null, httpClientOptions: HttpClientConfig<*>.() -> Unit = {
defaultRequest {
accept(VndApiJson)
contentType(VndApiJson)
}
}, httpClient: HttpClient = if (engineFactory == null) HttpClient(httpClientOptions) else HttpClient(
engineFactory,
httpClientOptions
))