getData

abstract suspend fun getData(forceRefresh: Boolean = false): T

Loads and returns data. Throws an exception on error. It never returns stale data. It makes a network request if data is stale.

Parameters

forceRefresh

forces to make a network request even when data is fresh.

Note: it will not lead to a new network request if another one is in progress.