asLiveData

fun asLiveData(): LiveData<T>

if the response is successful, it returns a LiveData which contains response data. if the response is failure or exception, it returns an empty LiveData. this live data can be observable from the network requests.