Customisation
defaultClientPool customization
defaultClientPool customizationFork HttpClient for specific tasks
HttpClient for specific tasksval patientClient = defaultHttpClient.fork {
readTimeout = 100_000
}Run HTTP methods on custom client
// a new client with custom dispatcher, connection pool and ping interval
val customClient = client {
dispatcher = ...
connectionPool = ConnectionPool( ... )
pingInterval = 1_000
sslConfig = SslConfig().apply {
sslSocketFactory = ...
trustManager = ...
hostnameVerifier = ...
certificatePinner = ...
followSslRedirects = ...
}
}Last updated
Was this helpful?