use of com.fastaccess.provider.rest.interceptors.ContentTypeInterceptor in project FastHub by k0shk0sh.
the class RestProvider method provideOkHttpClient.
public static OkHttpClient provideOkHttpClient() {
if (okHttpClient == null) {
OkHttpClient.Builder client = new OkHttpClient.Builder();
if (BuildConfig.DEBUG) {
client.addInterceptor(new HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY));
}
client.addInterceptor(new AuthenticationInterceptor());
client.addInterceptor(new PaginationInterceptor());
client.addInterceptor(new ContentTypeInterceptor());
okHttpClient = client.build();
}
return okHttpClient;
}
Aggregations