Unfortunate, Coroutines are still experimental on the Kotlin 1.2. This code is a simple HTTP GET/POST with JSON by using the AsyncTask. Hope this will help you.

All source code is on GitHub.

When Coroutines will be available. code might be more simple. 😗