KHttpConfig
Parameters
Base URL prepended to every request (must end with /).
Ktor engine. Defaults to platform default when null.
TCP connect timeout in milliseconds.
Full request timeout in milliseconds.
Ktor LogLevel. Use LogLevel.NONE in production.
Called on 4xx responses with status code + parsed message.
Called on 5xx responses with status code + parsed message.
Called on 401 outside authPaths. Clear your session here.
Path suffixes treated as auth endpoints (401 = wrong credentials).
Optional CookiesStorage for cookie-based auth.
Optional KAuthProvider injecting auth headers on every request. Also accepts KAuthProvider.Custom for global headers like trace IDs or app version — replaces the need for a separate request interceptor.
Optional KTokenRefresher for automatic 401 token refresh. Use KDefaultTokenRefresher for standard Bearer JWT flows, or implement KTokenRefresher directly for custom logic.
Optional KRequestInterceptor for global response-side hooks (analytics, logging). Request-side mutations belong in authProvider.
Optional KCacheConfig for in-memory GET response caching, backed by dev.kindling.utils.CircularBuffer and dev.kindling.utils.KMap.