All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.org.jellyfin.sdk.api.client.HttpClientOptions.kt Maven / Gradle / Ivy

There is a newer version: 1.6.3
Show newest version
package org.jellyfin.sdk.api.client

import org.jellyfin.sdk.api.sockets.SocketReconnectPolicy
import kotlin.time.Duration
import kotlin.time.Duration.Companion.seconds

/**
 * Options to use when making HTTP requests.
 */
public data class HttpClientOptions(
	/**
	 * Follows HTTP redirect responses if set to true.
	 * Defaults to true.
	 */
	val followRedirects: Boolean = true,

	/**
	 * Timeout for a complete HTTP request.
	 * Defaults to 30 seconds.
	 */
	val requestTimeout: Duration = 30.seconds,

	/**
	 * Timeout for connecting to the server.
	 * Defaults to 6 seconds.
	 */
	val connectTimeout: Duration = 6.seconds,

	/**
	 * Timeout between receiving or writing messages.
	 * Defaults to 30 seconds.
	 */
	val socketTimeout: Duration = 30.seconds,

	/**
	 * Policy to use for WebSocket reconnections.
	 * Defaults to [SocketReconnectPolicy.ExponentialDelayReconnect].
	 */
	val socketReconnectPolicy: SocketReconnectPolicy = SocketReconnectPolicy.ExponentialDelayReconnect(),
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy