dependency implementation 'com.squareup.retrofit2:retrofit:2.9.0' implementation 'com.squareup.okhttp3:logging-interceptor:4.2.1' implementation 'com.google.code.gson:gson:2.9.0' implementation 'com.squareup.retrofit2:retrofit:2.9.0' implementation 'com.squareup.retrofit2:converter-gson:2.9.0' ApiClient Class package com.example.reBLISS.retrofit ; import com.example.reBLISS.Constant ; import com.google.gson.Gson ; import com.google.gson.GsonBuilder ; import java.util.concurrent.TimeUnit ; import okhttp3.OkHttpClient ; import okhttp3.logging.HttpLoggingInterceptor ; import retrofit2.Retrofit ; import retrofit2.converter.gson.GsonConverterFactory ; public class ApiClient { private static Retrofit retrofit = null; public static Retrofit getClient () { Gson gson = new GsonBuilder() .setLenient() .create() ; HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor() ; interceptor....
Comments
Post a Comment