Constants Retrofit

public class Constants {

   
    public static final String BASE_URL = "https://tushar.club/";

    private static ApiService apiService;


    public static final ApiService getApiService(){
        if(apiService == null){
            HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
            // set your desired log level
            logging.setLevel(HttpLoggingInterceptor.Level.NONE);
            OkHttpClient.Builder httpClient = new OkHttpClient.Builder();
            httpClient.connectTimeout(5, TimeUnit.MINUTES);
            httpClient.readTimeout(5, TimeUnit.MINUTES);
            httpClient.addInterceptor(logging);  // <-- this is the important line!
            apiService = new Retrofit
                    .Builder()
                    .baseUrl(Constants.BASE_URL)
                    .addConverterFactory(GsonConverterFactory.create())
                    .client(httpClient.build())
                    .build()
                    .create(ApiService.class);
        }
        return apiService;
    }

}