Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public interface ApiInterface {
- @POST("/iuk/api/credentials")
- Call<ServerResponse> operation(@Body ServerRequest request);
- }
- public class RetrofitApiClient {
- private static final String BASE_URL = "https://xyz.000webhostapp.com";
- private static Retrofit retrofit = null;
- private static Gson gson = new GsonBuilder()
- .setLenient()
- .create();
- private RetrofitApiClient() {}
- public static synchronized Retrofit getClient() {
- if (retrofit==null) {
- retrofit = new Retrofit.Builder()
- .baseUrl(Config_Ref.BASE_URL)
- .addConverterFactory(GsonConverterFactory.create(gson))
- .build();
- }
- return retrofit;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement