Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
chainApi1AndApi1()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(object : Subscriber<okhttp3.Response>() {
override fun onCompleted() {
}
override fun onError(e: Throwable) {
e.printStackTrace()
}
override fun onNext(response: okhttp3.Response) {
if (response.isSuccessful)
Logger.d(response)
else
onError(ApiRequestException(response))
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.