onSuccess

suspend fun onSuccess(action: suspend (T) -> Unit): Response<T>

Executes the given action if this is a Success response.

Return

This response for chaining.

Parameters

action

The suspend function to execute with the success data.