suspendOperator

suspend fun <T, V : ApiResponseSuspendOperator<T>> ApiResponse<T>.suspendOperator(apiResponseOperator: V): ApiResponse<T>

Author

skydoves (Jaewoong Eum)

Operates on an ApiResponse and return an ApiResponse which should be handled in the suspension scope. This allows you to handle success and error response instead of the ApiResponse.suspendOnSuccess, ApiResponse.suspendOnError, ApiResponse.suspendOnException transformers.