Skip to main content

Network Configuration

Quickplay library manages creating the HttpClient instance and abstracts the ability to securely communicate with the Platform APIs. HttpClientConfiguration encapsulates the configuration required in obtaining the HttpClient instance. It is optional to override the default configuration values defined in library.

note

HttpClientConfiguration should be set at the launch of application before initiating the call with any of the APIs(Platform specifc 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)