Created
November 4, 2019 14:07
-
-
Save AndSky90/578a222be0864a06aaab91343e6be646 to your computer and use it in GitHub Desktop.
observable from callable rx
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
fun loadPdf(url: String) = Observable.fromCallable { | |
val request = Request.Builder().url(url).build() | |
val call = coreNetwork.getOkHttp().newCall(request) | |
call.execute().body()!!.source().inputStream() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment