NetworkClient

interface NetworkClient

Utility class for making asynchronous Http requests.

Requests will be made on an IO thread, but any completions will be executed on the Tealium background thread.

Functions

Link copied to clipboard
abstract fun addInterceptor(interceptor: Interceptor)

Adds an interceptor to the client's list of interceptors.

Link copied to clipboard
abstract fun removeInterceptor(interceptor: Interceptor)

Removes an interceptor from the client's list of interceptors.

Link copied to clipboard
abstract fun sendRequest(request: HttpRequest, completion: Callback<NetworkResult>): Disposable

Sends an HTTP request asynchronously and returns the result to the provided completion block. The request is retried if necessary based on the provided request and the response NetworkResult.