Created
March 27, 2019 01:39
-
-
Save mitchtabian/665cc0c3b8a3f606d5f5825d716e202e to your computer and use it in GitHub Desktop.
This file contains 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 ServiceGenerator { | |
public static final String BASE_URL = "https://jsonplaceholder.typicode.com"; | |
private static Retrofit.Builder retrofitBuilder = | |
new Retrofit.Builder() | |
.baseUrl(BASE_URL) | |
.addCallAdapterFactory(RxJava2CallAdapterFactory.create()) | |
.addConverterFactory(GsonConverterFactory.create()); | |
private static Retrofit retrofit = retrofitBuilder.build(); | |
private static RequestApi requestApi = retrofit.create(RequestApi.class); | |
public static RequestApi getRequestApi(){ | |
return requestApi; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment