Skip to content

Instantly share code, notes, and snippets.

@lsurvila
lsurvila / DownloadFileWithRetrofit2RxJava.java
Last active August 12, 2024 07:37
Download file with Retrofit 2, OkHttp, Okio and RxJava
import com.squareup.okhttp.ResponseBody;
import okio.BufferedSink;
import okio.Okio;
import retrofit.Response;
import retrofit.http.GET;
import retrofit.http.Query;
import rx.Observable;
interface ApiService {