mapSuccess

internal inline fun <T : Any, U : Any> NetworkResponse<T>.mapSuccess(mapping: (T) -> U): NetworkResponse<U>

If the request is successful, perform mapping and create a new Success with its result

Return

A new NetworkResponse.Success with the mapped result, or NetworkResponse.Error if it was never a success to begin with