HttpClientConfiguration

class HttpClientConfiguration(val connectionTimeout: Long?, val readTimeout: Long?, val userAgent: String?, val retryOnNetworkFailure: Boolean?, val maxNetworkFailureRetryCount: Int?, val baseNetworkFailureRetryDelayMs: Long?, val applicationInterceptors: List<Interceptor>?)

Configuration data required by HttpClient.Builder to create HttpClient instance

Constructors

Link copied to clipboard
constructor(connectionTimeout: Long?, readTimeout: Long?, userAgent: String?, retryOnNetworkFailure: Boolean?, maxNetworkFailureRetryCount: Int?, baseNetworkFailureRetryDelayMs: Long?, applicationInterceptors: List<Interceptor>?)

Creates a configuration for obtaining HttpClient instance.

Types

Link copied to clipboard
class Builder

Properties

Link copied to clipboard
val applicationInterceptors: List<Interceptor>?

the list of custom interceptors to be added to http builders

Link copied to clipboard

The base delay (in milliseconds) before the first retry. Subsequent retries will use an linear increasing delay based on this value.

Link copied to clipboard

the connect timeout for new connections in seconds. The connect timeout is applied when connecting a TCP socket to the target host.

Link copied to clipboard

The maximum number of times that the interceptor will attempt to recover from network connection failure before propagating an error.

Link copied to clipboard

the default read timeout for new connections. The read timeout is applied to both the TCP socket and for individual read IO operations.

Link copied to clipboard

the value indicates whether retry is enabled for network connection failure. By default it is true

Link copied to clipboard