//NetworkResponseAdapter/com.haroldadmin.cnradapter/invoke
invoke
[jvm]\ operator fun <T : Any, U : Any> NetworkResponse<T, U>.invoke(): T?
Overloaded invoke operator to get the successful body or null in NetworkResponse class
Parameters
jvm
T | the success body type of NetworkResponse |
U | the error body type of NetworkResponse Example: val usersResponse = executeWithRetry { getUsers() } println(usersResponse() ?: "No users found") |