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.
Each client has a fixed list of RequestInterceptors that decide whether a failed request is retried. The shared client in NetworkUtilities.networkClient has none, so it makes a single attempt per request; use newClient to derive a client that retries, e.g. with RequestInterceptors.retryWithBackoff and RequestInterceptors.retryWhenConnected.
Functions
Creates a NetworkHelper that sends every request through this client.
Same as newClient with a maxRetryCount, with no limit on the number of retries.
Creates a new NetworkClient from this instance which will also use the given interceptors.
Sends an HTTP request asynchronously and returns the result to the provided completion block. The request is retried, when necessary, as decided by this client's interceptors, based on the provided request and the response NetworkResult.
Builds the request and sends it asynchronously, returning the result to the provided completion block.