//package com.hc.lib.http;
//
//import java.util.concurrent.TimeUnit;
//
//import okhttp3.OkHttpClient;
//import okhttp3.logging.HttpLoggingInterceptor;
//
//final class OkHttpClientSingleton {
//
//    private static OkHttpClientSingleton instance;
//
//    private OkHttpClient okHttpClient;
//
//    public static OkHttpClientSingleton getInstance() {
//        if(instance == null) {
//            instance = new OkHttpClientSingleton();
//        }
//        return instance;
//    }
//
//    private OkHttpClientSingleton() {
//        okHttpClient = new OkHttpClient.Builder()
//                .connectTimeout(60, TimeUnit.SECONDS)
//                .writeTimeout(60, TimeUnit.SECONDS)
//                .readTimeout(60, TimeUnit.SECONDS)
//                .retryOnConnectionFailure(true)
//                .addNetworkInterceptor(new HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY))
//                .build();
//    }
//
//    public OkHttpClient getHttpClient() {
//        return okHttpClient;
//    }
//}
