private synchronized CloseableHttpClient constructHttpClient(int timeout) {
        if (httpClient != null) {
            return httpClient;
        }
        long timeoutInMs = TimeUnit.SECONDS.toMillis(timeout);
        RequestConfig requestConfig = RequestConfig.custom()
                .setConnectTimeout((int) timeoutInMs)
                .setSocketTimeout((int) timeoutInMs).build();
        HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
        httpClientBuilder.setDefaultRequestConfig(requestConfig);
        return httpClientBuilder.build();
    }
construct http client

@param timeout timeout setting
@return closeable timeout
inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/utils/HttpManager.java