content: package my.project.silisili.net;
  
  import java.util.concurrent.TimeUnit;
  
  import okhttp3.Call;
  import okhttp3.Callback;
  import okhttp3.OkHttpClient;
  import okhttp3.Request;
  
  public class HttpGet {
      private final static int connectTimeout = 10;
      private final static int readTimeout = 20;
  
      public HttpGet(String url, Callback callback) {
          OkHttpClient client = new OkHttpClient.Builder()
                  .connectTimeout(connectTimeout, TimeUnit.SECONDS)
                  .readTimeout(readTimeout, TimeUnit.SECONDS)
                  .build();
          Request request = new Request.Builder()
                  .url(url)
                  .get()
                  .build();
          Call call = client.newCall(request);
          call.enqueue(callback);
      }
  
      public HttpGet(String url, String host, Callback callback) {
          OkHttpClient client = new OkHttpClient.Builder()
                  .connectTimeout(connectTimeout, TimeUnit.SECONDS)
                  .readTimeout(readTimeout, TimeUnit.SECONDS)
                  .build();
          Request request = new Request.Builder()
                  .url(url)
                  .addHeader("Host", host)
                  .addHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36")
                  .get()
                  .build();
          Call call = client.newCall(request);
          call.enqueue(callback);
      }
  }
  