ResourceMetadata httpHead(String url) throws IOException, InterruptedException {
    return client.send(newHttpRequest(url).HEAD().build(),
      responseInfo -> {
        int status = responseInfo.statusCode();
        Optional<String> location = Optional.empty();
        OptionalLong contentLength = OptionalLong.empty();
        HttpHeaders headers = responseInfo.headers();
        if (status >= 300 && status < 400) {
          location = responseInfo.headers().firstValue(LOCATION);
          if (location.isEmpty()) {
            throw new IllegalStateException("Received " + status + " but no location header from " + url);
          }
        } else if (responseInfo.statusCode() != 200) {
          throw new IllegalStateException("Bad response: " + responseInfo.statusCode());
        } else {
          contentLength = headers.firstValueAsLong(CONTENT_LENGTH);
        }
        boolean supportsRangeRequest = headers.allValues(ACCEPT_RANGES).contains("bytes");
        ResourceMetadata metadata = new ResourceMetadata(location, url, contentLength, supportsRangeRequest);
        return HttpResponse.BodyHandlers.replacing(metadata).apply(responseInfo);
      }).body();
  }
Starts downloading all resources in parallel, logging progress until complete.

@throws IllegalStateException if an error occurs downloading any resource, will be thrown after all resources
                              finish
planetiler-core/src/main/java/com/onthegomap/planetiler/util/Downloader.java