Last active
August 29, 2015 14:27
-
-
Save patrykpoborca/e2c1e665b69125abbbf6 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
public class Retrofit { | |
protected OKHttp okHttp; | |
protected final Scheduler mainScheduler; | |
public Retrofit(OKHttp okHttp, Scheduler mainScheduler) { | |
this.okHttp = okHttp; | |
this.mainScheduler = mainScheduler; | |
} | |
public Observable<String> completeRequest(){ | |
return Observable.just(okHttp.rawResponse() + " Some Parsing Done") | |
.delay(2, TimeUnit.SECONDS); | |
} | |
public Observable<String> fetchSomePage(String url){ | |
return Observable.just("<h2>" + "Fake response from fake retrofit: " + url + " </h2>") | |
.delay(2, TimeUnit.SECONDS) | |
.observeOn(mainScheduler); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment