public static boolean constructHttpClient(boolean rptByHttps,
            int socketTimeoutMs, int conTimeoutMs, String tlsVer, ProcessResult procResult) {
        CloseableHttpClient httpClient;
        RequestConfig requestConfig = RequestConfig.custom()
                .setSocketTimeout(socketTimeoutMs)
                .setConnectTimeout(conTimeoutMs).build();
        try {
            if (rptByHttps) {
                SSLContext sslContext = SSLContexts.custom().build();
                SSLConnectionSocketFactory sslSf = new SSLConnectionSocketFactory(sslContext,
                        new String[]{tlsVer}, null,
                        SSLConnectionSocketFactory.getDefaultHostnameVerifier());
                httpClient = HttpClients.custom()
                        .setDefaultRequestConfig(requestConfig)
                        .setSSLSocketFactory(sslSf).build();
            } else {
                httpClient = HttpClientBuilder.create()
                        .setDefaultRequestConfig(requestConfig).build();
            }
            return procResult.setSuccess(httpClient);
        } catch (Throwable ex) {
            if (exceptCnt.shouldPrint()) {
                logger.error("Build http client exception", ex);
            }
            return procResult.setFailResult(ErrorCode.HTTP_BUILD_CLIENT_EXCEPTION, ex.getMessage());
        }
    }
Http(s) Utils class

Used to place public processing functions related to HTTP(s)
inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/utils/HttpUtils.java