Skip to main content

Network Configuration

The Quickplay library manages creating the HttpClient instance and abstracts the ability to securely communicate with the platform APIs. HttpClientConfiguration encapsulates the configuration required to obtain the HttpClient instance. You can optionally override the default configuration values defined in the library.

note

Set HttpClientConfiguration at the launch of your application before initiating the call with any of the APIs (platform-specific or tenant-specific APIs).

Property NameTypeDefault ValueDescription
connectionTimeoutLong15The duration in seconds for which the player tries to connect to the network before throwing a SocketTimeoutException.
readTimeoutLong15The duration in seconds for which the player tries to read from the network before throwing a SocketTimeoutException.
const val DEFAULT_HTTP_CLIENT_TIMEOUT_SECONDS = 15L

val httpClientConfig = HttpClientConfiguration.Builder()
.connectionTimeout(DEFAULT_HTTP_CLIENT_TIMEOUT_SECONDS)
.readTimeout(DEFAULT_HTTP_CLIENT_TIMEOUT_SECONDS)
.build()
FoundationFactory.configureHttpClient(httpClientConfig)