request

open override fun request(): ResponseDataSource<T>

request API network call asynchronously. if the request is successful, this data source will hold the success response model. in the next request after success, returns the cached API response. if you need to fetch a new response data or refresh, use invalidate().


inline fun request(crossinline action: ApiResponse<T>.() -> Unit): ResponseDataSource<T>

extension method for requesting and observing response at once.