Skip to content

Instantly share code, notes, and snippets.

@enginebai
Created July 26, 2018 00:42
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 enginebai/f383fffd1ba2f12aaebf2f3826286d8d to your computer and use it in GitHub Desktop.
Save enginebai/f383fffd1ba2f12aaebf2f3826286d8d to your computer and use it in GitHub Desktop.
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