sendRequest
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.
Return
A Disposable that can be used to cancel the request.
Parameters
The HttpRequest object representing the request to be sent.
The block to receive the result of the network request. This will be called on Tealium's background thread.
Builds the request and sends it asynchronously, returning the result to the provided completion block.
Unlike sendRequest, this overload takes an unbuilt HttpRequest.Builder and so absorbs the MalformedURLException that HttpRequest.Builder.build may throw for an invalid url. In that case no request is made, completion is called with a NetworkResult.Failure wrapping a NetworkException.UnexpectedException, and a disposed Disposable is returned.
Return
A Disposable that can be used to cancel the request.
Parameters
The HttpRequest.Builder representing the request to be built and sent.
The block to receive the result of the network request. This will be called on Tealium's background thread.