Skip to content

Instantly share code, notes, and snippets.

@thenixan
Created January 30, 2018 10:50
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 thenixan/48ec70818ac64bbaefa1033bd5d7f87b to your computer and use it in GitHub Desktop.
Save thenixan/48ec70818ac64bbaefa1033bd5d7f87b to your computer and use it in GitHub Desktop.
interface Api {
@GET("thenixan-blogposts/json-streaming-data/master/one-large-file.json")
fun loadDataInUsualWay(): Single<DataHolder>
}
val service = Retrofit.Builder()
.baseUrl("https://raw.githubusercontent.com/")
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.addConverterFactory(GsonConverterFactory.create())
.build()
.create(Api::class.java)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment