Updated on 2026-08-14

This commit is contained in:
Tangem 2018-10-11 13:16:21 +03:00
parent 922610a9ed
commit 3b04da7388
6 changed files with 86 additions and 54 deletions

View file

@ -43,7 +43,7 @@ class NetworkModule {
return new Retrofit.Builder()
.baseUrl(Server.ApiTangem.URL_TANGEM)
.addConverterFactory(GsonConverterFactory.create())
.client(createHttpClient())
.client(createOkHttpClient())
.build();
}
@ -54,7 +54,7 @@ class NetworkModule {
return new Retrofit.Builder()
.baseUrl(Server.ApiUpdateVersion.URL_UPDATE_VERSION)
.addConverterFactory(GsonConverterFactory.create())
.client(createHttpClient())
.client(createOkHttpClient())
.build();
}
@ -69,13 +69,13 @@ class NetworkModule {
.build();
}
private OkHttpClient createHttpClient() {
private OkHttpClient createOkHttpClient() {
return new OkHttpClient.Builder().
addInterceptor(createLogging()).
addInterceptor(createHttpLoggingInterceptor()).
build();
}
private HttpLoggingInterceptor createLogging() {
private HttpLoggingInterceptor createHttpLoggingInterceptor() {
HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
logging.setLevel(HttpLoggingInterceptor.Level.BODY);
return logging;