Created
July 26, 2018 00:42
-
-
Save enginebai/f383fffd1ba2f12aaebf2f3826286d8d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
object Api { | |
fun api1(): Observable<Response<Media>> = | |
ApiHelper.getApi().api1() | |
fun api2(uploadUrl: String): Observable<okhttp3.Response> = | |
Observable.fromCallable { | |
val request = Request.Builder() | |
.url(uploadUrl) | |
.build() | |
ApiHelper.getMediaUploadHttpClient().newCall(request).execute() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment