Created
August 15, 2018 14:34
-
-
Save mayuroks/d3c0f9e8e1616815fa5ec9c563214852 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 HttpClient { | |
private static final String API_BASE_URL = "https://jsonplaceholder.typicode.com/"; | |
private static Retrofit retrofit = new Retrofit.Builder() | |
.baseUrl(API_BASE_URL) | |
.addCallAdapterFactory(RxJava2CallAdapterFactory.create()) | |
.addConverterFactory(GsonConverterFactory.create()) | |
.build(); | |
private static ApiService apiService = retrofit.create(ApiService.class); | |
public static ApiService getApiService() { | |
return apiService; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment