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 ))

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open suspend override fun delete(url: String, parameters: Map<String, String>): HttpClientResponse
Link copied to clipboard
open suspend override fun get(url: String, parameters: Map<String, String>): HttpClientResponse
Link copied to clipboard
open suspend override fun patch(url: String, body: String, parameters: Map<String, String>): HttpClientResponse
Link copied to clipboard
open suspend override fun post(url: String, body: String, parameters: Map<String, String>): HttpClientResponse
Link copied to clipboard
open suspend override fun put(url: String, body: String, parameters: Map<String, String>): HttpClientResponse