Skip to content

Instantly share code, notes, and snippets.

@DroidLove
Created December 28, 2018 12:31
Show Gist options
  • Save DroidLove/8fa20b41f4e9bbd63b912421af31c248 to your computer and use it in GitHub Desktop.
Save DroidLove/8fa20b41f4e9bbd63b912421af31c248 to your computer and use it in GitHub Desktop.
GlobalScope.launch(Dispatchers.IO) {
try {
val request = retroApiInterface.getEmployeeListing()
val response = request.await().body()
handlingUI(response)
} catch (exception: Exception) {
Log.e("Retrofit Exception", exception.toString())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment