onLoading

fun onLoading(action: () -> Unit): Response<T>

Executes the given action if this is a Loading response.

Return

This response for chaining.

Parameters

action

The function to execute when loading.