I am using Retrofit 2.1.0
library, and use call.enqueue
method to do async API calls.
The CallBack
class returns onResponse(Call call, Response response)
and onFailure (Call call, Throwable t)
.
My question is that, is it safe to assume that the Response ( not response.body) object in the onResponse
method will always be NonNull?
If it can be null, what can be the possible scenarios?
I looked online and on Retrofit docs, but no clear answers.