code: public static boolean isServerReachable(String baseUrl, long connectTimeout, TimeUnit timeUnit) throws IOException {
          OkHttpClient client = new OkHttpClient();
          client.setConnectTimeout(connectTimeout, timeUnit);
          return isServerReachable(baseUrl, client);
      }
docs: Check if the server is reachable
  
  @param baseUrl The url of the server to test
  @param connectTimeout connection timeout
  @param timeUnit connection timeout unit
  @return true if reachable otherwise false.
  @throws IOException if an error occurs