onSuccess

inline fun onSuccess(block: (T) -> Unit): RestResult<T>(source)

Runs the given block on the encapsulated value if this instance represents success.

Returns the original RestResult unchanged.

Thrown exceptions inside the block are rethrown.