Target filter
Search Kotlin docs
  • Back
  • Tealium Prism Kotlin SDK Reference
core/com.tealium.prism.core.api.network/NetworkClient/newClient

newClient

abstract fun newClient(additionalInterceptors: List<RequestInterceptor>, maxRetryCount: Int?): NetworkClient

Creates a new NetworkClient from this instance which will also use the given interceptors.

Its interceptors are this instance's followed by additionalInterceptors:

  • The given interceptors come after this instance's, so they are asked first for retry decisions (see RequestInterceptor.shouldRetry).

  • RequestInterceptor.onAttemptResult is called on all the interceptors in list order.

This instance is unaffected: its requests keep going only through its own interceptors.

Return

A new NetworkClient instance.

Parameters

additionalInterceptors

The interceptors to add after this instance's interceptors.

maxRetryCount

The maximum number of retries of a request, whichever interceptor proposes them; null means no limit. Not inherited from this instance.


open fun newClient(additionalInterceptors: List<RequestInterceptor>): NetworkClient

Same as newClient with a maxRetryCount, with no limit on the number of retries.

Return

A new NetworkClient instance.

Parameters

additionalInterceptors

The interceptors to add after this instance's interceptors.

Generated by Dokka
(c) Tealium 2026