HttpClientConfig

Configuration class for creating a default Ktor HTTP client with standard settings.

This class provides a DSL for configuring the default HTTP client created by the HttpClient factory function. It allows customization of timeout and logging behavior while using sensible defaults.

Default values:

  • Timeout: 15 seconds

  • Logger: WARN level (logs warnings and errors only)

See also

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

The logger instance to use for HTTP client logging.

Link copied to clipboard

The timeout duration for HTTP requests.

Functions

Link copied to clipboard
fun onRequest(interceptor: HttpRequest.() -> Unit)

Registers a request interceptor.

Link copied to clipboard
fun onResponse(interceptor: HttpResponse.() -> Unit)

Registers a response interceptor.