// Path: CoolHttp/app/src/main/java/com/yanzhenjie/coolhttp/http/execute/HttpExecutor.java
// public interface HttpExecutor {
// 
//     HttpURLConnection openUrl(URL url, Proxy proxy) throws IOException;
// 
// }
// 
// Path: CoolHttp/app/src/main/java/com/yanzhenjie/coolhttp/http/execute/OkHttpExecutor.java
// public class OkHttpExecutor implements HttpExecutor {
// 
// 
//     private static OkHttpExecutor instance;
// 
//     public static HttpExecutor getInstance() {
//         if (instance == null)
//             synchronized (OkHttpExecutor.class) {
//                 if (instance == null)
//                     instance = new OkHttpExecutor();
//             }
//         return instance;
//     }
// 
//     private OkHttpClient okHttpClient;
// 
//     private OkHttpExecutor() {
//         okHttpClient = new OkHttpClient();
//     }
// 
//     @Override
//     public HttpURLConnection openUrl(URL url, Proxy proxy) throws IOException {
//         String protocol = url.getProtocol(); // http or https.
//         OkHttpClient copy = okHttpClient.newBuilder().proxy(proxy).build();
// 
//         if (protocol.equals("http")) return new OkHttpURLConnection(url, copy);
//         if (protocol.equals("https")) return new OkHttpsURLConnection(url, copy);
//         throw new IllegalArgumentException("Unexpected protocol: " + protocol);
//     }
// 
// }


import android.content.Context;
import com.yanzhenjie.coolhttp.http.execute.HttpExecutor;
import com.yanzhenjie.coolhttp.http.execute.OkHttpExecutor;
        sHttpConfig = httpConfig;
    }

    private static void hasInitialize() {
        if (sContext == null)
            throw new ExceptionInInitializerError("Please invoke CoolHttp.initialize(Application) in Application#onCreate()");
    }

    public static HttpExecutor getHttpExecutor() {
        hasInitialize();
        return sHttpConfig.httpExecutor;
    }

    public static int getConnectionTimeout() {
        hasInitialize();
        return sHttpConfig.connectionTimeout;
    }

    public static int getReadTimeout() {
        hasInitialize();
        return sHttpConfig.readTimeout;
    }

    public static class HttpConfig {

        private HttpExecutor httpExecutor;
        private int connectionTimeout;
        private int readTimeout;

        public HttpConfig() {
// Path: CoolHttp/app/src/main/java/com/yanzhenjie/coolhttp/http/execute/HttpExecutor.java
// public interface HttpExecutor {
// 
//     HttpURLConnection openUrl(URL url, Proxy proxy) throws IOException;
// 
// }
// 
// Path: CoolHttp/app/src/main/java/com/yanzhenjie/coolhttp/http/execute/OkHttpExecutor.java
// public class OkHttpExecutor implements HttpExecutor {
// 
// 
//     private static OkHttpExecutor instance;
// 
//     public static HttpExecutor getInstance() {
//         if (instance == null)
//             synchronized (OkHttpExecutor.class) {
//                 if (instance == null)
//                     instance = new OkHttpExecutor();
//             }
//         return instance;
//     }
// 
//     private OkHttpClient okHttpClient;
// 
//     private OkHttpExecutor() {
//         okHttpClient = new OkHttpClient();
//     }
// 
//     @Override
//     public HttpURLConnection openUrl(URL url, Proxy proxy) throws IOException {
//         String protocol = url.getProtocol(); // http or https.
//         OkHttpClient copy = okHttpClient.newBuilder().proxy(proxy).build();
// 
//         if (protocol.equals("http")) return new OkHttpURLConnection(url, copy);
//         if (protocol.equals("https")) return new OkHttpsURLConnection(url, copy);
//         throw new IllegalArgumentException("Unexpected protocol: " + protocol);
//     }
// 
// }


// Path: CoolHttp/app/src/main/java/com/yanzhenjie/coolhttp/http/CoolHttp.java
import android.content.Context;
import com.yanzhenjie.coolhttp.http.execute.HttpExecutor;
import com.yanzhenjie.coolhttp.http.execute.OkHttpExecutor;

        sHttpConfig = httpConfig;
    }

    private static void hasInitialize() {
        if (sContext == null)
            throw new ExceptionInInitializerError("Please invoke CoolHttp.initialize(Application) in Application#onCreate()");
    }

    public static HttpExecutor getHttpExecutor() {
        hasInitialize();
        return sHttpConfig.httpExecutor;
    }

    public static int getConnectionTimeout() {
        hasInitialize();
        return sHttpConfig.connectionTimeout;
    }

    public static int getReadTimeout() {
        hasInitialize();
        return sHttpConfig.readTimeout;
    }

    public static class HttpConfig {

        private HttpExecutor httpExecutor;
        private int connectionTimeout;
        private int readTimeout;

        public HttpConfig() {
            httpExecutor = OkHttpExecutor.getInstance();