getDataItemConvertible
abstract fun <T> getDataItemConvertible(url: URL, etag: String? = null, additionalHeaders: Map<String, String>? = null, converter: DataItemConverter<T>, completion: DeserializedNetworkCallback<T>): Disposable
abstract fun <T> getDataItemConvertible(url: String, etag: String? = null, additionalHeaders: Map<String, String>? = null, converter: DataItemConverter<T>, completion: DeserializedNetworkCallback<T>): Disposable
Asynchronously fetches the given url and returns the payload parsed as a DataItem and then converted to an instance of T using by the given converter.
An optional etag can be supplied if the resource being requested is already available on the device and may be able to be re-used.
Parameters
url
The Url to GET
etag
Optional etag of the currently known resource
additionalHeaders
Optional map of additional headers to add to the request
converter
DataItemConverter to convert a DataItem to an instance of T
completion
completion to be notified with the result