httpClient

fun httpClient(json: Json = json(), enableLogging: Boolean = false, enableRetry: Boolean = true, maxRetries: Int = 3, block: HttpClientConfig<*>.() -> Unit = {}): HttpClient

Create a new HttpClient with the given json configuration.

Customization of the HttpClient can be done with the block parameter.

Return

A new HttpClient with the given json configuration.

Parameters

json

The Json configuration to use for the HttpClient.

enableLogging

Whether or not to enable logging.

enableRetry

Whether or not to enable retrying 500 errors.

maxRetries

The maximum number of retries to attempt.

block

Customization of the HttpClient.