智慧考勤 v1.0.28版本的 MD5 值为:12729d810518c958a6eb8d5a86a946dd
以下内容为反编译后的 RetrofitClient.java 源代码,内容仅作参考
package net.itgoo.component.sdk.rest;
import java.util.concurrent.TimeUnit;
import net.itgoo.component.sdk.rest.interceptor.HttpLoggingInterceptor;
import okhttp3.OkHttpClient;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;
public class RetrofitClient {
private static final int DEFAULT_TIMEOUT = 60;
private static final Retrofit sRetrofit = new Retrofit.Builder().client(httpClientBuild()).addConverterFactory(GsonConverterFactory.create()).addCallAdapterFactory(RxJava2CallAdapterFactory.create()).baseUrl("http://www.tssx.site/").build();
public static Retrofit getRetrofit() {
return sRetrofit;
}
private static OkHttpClient httpClientBuild() {
OkHttpClient.Builder builder = new OkHttpClient.Builder();
builder.connectTimeout(60L, TimeUnit.SECONDS);
builder.addInterceptor(HttpLoggingInterceptor.build());
return builder.build();
}
}