smilecs
11/05/2017, 10:34 AMuserData.token = response.body()?.token!!
gildor
11/06/2017, 5:08 AM!!
).
Also you can replace body()?
with body()!!
of your token is non nullable and you want to crash
Boot looks like retrofit, so maybe callback-style approach could be a better option, because you shouldn’t handle body reading each time, but have callbacks for success and error.
Anyway, always depends on case, there is no universal answer without knowledge of context