Created
June 18, 2018 11:48
-
-
Save mohak1712/76253e23ffd3e27c632ea6de1768aeda 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
@Module | |
public class TestApplicationModule extends ApplicationModule { | |
public TestApplicationModule(Application application) { | |
super(application); | |
} | |
@Provides | |
@Singleton | |
public Retrofit getRetrofit(OkHttpClient client) { | |
return new Retrofit.Builder() | |
.addConverterFactory(GsonConverterFactory.create()) | |
.client(client) | |
.addCallAdapterFactory(RxJava2CallAdapterFactory.create()) | |
.baseUrl("http://localhost:8080/") | |
.build(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment