retry
inline suspend fun <T : Any> retry( retry: Int = 1, timeMillis: Long = 1000, execute: () -> ApiResponse<T>): ApiResponse<T>
Content copied to clipboard
Retry the given function execute specified number of times with delays if the execute returns ApiResponse.Failure.
Parameters
retry
Retry times if the given function execute returns ApiResponse.Failure.
timeMillis
Milli seconds delay before retrying the given function execute.
execute
An executable lambda which returns ApiResponse.