Target filter
Search Kotlin docs
  • Platforms
  • Tealium Prism Kotlin
core/com.tealium.prism.core.api.network/NetworkHelper/getDeserializable

getDeserializable

abstract fun <T> getDeserializable(url: String, etag: String? = null, additionalHeaders: Map<String, String>? = null, deserializer: Deserializer<String, T?>, completion: DeserializedNetworkCallback<T>): Disposable
abstract fun <T> getDeserializable(url: URL, etag: String? = null, additionalHeaders: Map<String, String>? = null, deserializer: Deserializer<String, T?>, completion: DeserializedNetworkCallback<T>): Disposable

Asynchronously fetches the given url and returns the payload parsed as a String and then converted to an instance of T using by the given deserializer.

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

deserializer

Deserializer to convert a String to an instance of T

completion

completion to be notified with the result

Generated by Dokka
(c) Tealium 2026