Skip to content

Instantly share code, notes, and snippets.

@timusus
Created October 20, 2018 03:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timusus/82ba56e382bb07c4c3238a8889fb6fbf to your computer and use it in GitHub Desktop.
Save timusus/82ba56e382bb07c4c3238a8889fb6fbf to your computer and use it in GitHub Desktop.
Retrofit Enqueue Snippet
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