code: private static InputStream openStream(String resource) throws IOException {
      HttpURLConnection
          connection =
          HttpURLConnection.class.cast(URI.create(resource).toURL().openConnection());
      connection.setConnectTimeout(1000 * 2);
      connection.setReadTimeout(1000 * 2);
      connection.setAllowUserInteraction(false);
      connection.setInstanceFollowRedirects(false);
      return connection.getInputStream();
    }
docs: quick http client that allows no-dependency try at getting instance data.