This code demo various network access approach in Android, starting from the very primitive approach (i.e. Directly calling network in main thread) to the more elegant RxJava, and then with coroutines introduced.
There's a blog on it https://medium.com/@elye.project/the-evolution-of-android-network-access-1e199fc6e9a2
Enjoy.