Downloader

abstract class Downloader

Inheritors

Constructors

Link copied to clipboard
constructor(okHttpClient: OkHttpClient)

Types

Link copied to clipboard
abstract class Callback
Abstract class for the callbacks.

Properties

Link copied to clipboard
Link copied to clipboard
open var url: String

Functions

Link copied to clipboard
open fun cancel()
Link copied to clipboard
open fun invalidate()
Link copied to clipboard
open fun isDataLoaded(): Boolean
Link copied to clipboard
open fun isFromCache(): Boolean
Link copied to clipboard
open fun isLoading(): Boolean
Link copied to clipboard
open fun loadAsync()
open fun loadAsync(callback: Downloader.Callback)
Downloads the specified endpoint by setPath as a string and calls onResponse on success.
Link copied to clipboard
open fun setInMemoryCacheTime(seconds: Int)
When set to a value higher than 0, it uses this time in seconds as cache time.
Link copied to clipboard
open fun setRetryCount(retryCount: Int)
Sets the number of times a download should be retried on failure.