public static boolean headRequest(RestTemplate restTemplate, String url, Map<String, Object> params,
            HttpHeaders header) {
        ResponseEntity<String> exchange;
        boolean result = false;
        HttpEntity<String> request = new HttpEntity(params, header);
        log.debug("send request to {}, param {}", url, params);
        exchange = restTemplate.exchange(url, HttpMethod.HEAD, request, String.class);
        HttpStatus statusCode = exchange.getStatusCode();
        if (statusCode.is2xxSuccessful()) {
            result = statusCode.is2xxSuccessful();
        }
        log.debug("success request to {},  status code {}, body {}", url, statusCode, exchange.getBody());
        return result;
    }
Send HEAD request to the specified URL.
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/util/HttpUtils.java