HttpClientOptions

data class HttpClientOptions(val followRedirects: Boolean = true, val requestTimeout: Duration = 30.seconds, val connectTimeout: Duration = 6.seconds, val socketTimeout: Duration = 30.seconds, val socketReconnectPolicy: SocketReconnectPolicy = SocketReconnectPolicy.ExponentialDelayReconnect())

Options to use when making HTTP requests.

Constructors

Link copied to clipboard
constructor(followRedirects: Boolean = true, requestTimeout: Duration = 30.seconds, connectTimeout: Duration = 6.seconds, socketTimeout: Duration = 30.seconds, socketReconnectPolicy: SocketReconnectPolicy = SocketReconnectPolicy.ExponentialDelayReconnect())

Properties

Link copied to clipboard

Timeout for connecting to the server. Defaults to 6 seconds.

Link copied to clipboard

Follows HTTP redirect responses if set to true. Defaults to true.

Link copied to clipboard

Timeout for a complete HTTP request. Defaults to 30 seconds.

Link copied to clipboard

Policy to use for WebSocket reconnections. Defaults to SocketReconnectPolicy.ExponentialDelayReconnect.

Link copied to clipboard

Timeout between receiving or writing messages. Defaults to 30 seconds.