Created
October 20, 2018 03:26
-
-
Save timusus/82ba56e382bb07c4c3238a8889fb6fbf 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 onSuccess(response: Response) { | |
// Todo: Check if response is valid (>200 & < 300) or call | |
} | |
override fun onError(error: Error) { | |
// Todo: Handle error | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment