Created
October 20, 2018 03:26
-
-
Save timusus/b1bb8d8f7d3f2e74e8f97881a4842b50 to your computer and use it in GitHub Desktop.
Retrofit Enqueue Snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call.enqueue { | |
override fun onResponse(response: Response) { | |
// Todo: Check if response is valid (>200 & < 300) or call | |
// Todo: Handle error if not valid | |
} | |
override fun onFailure() { | |
// Todo: Handle error | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment