public String doSentPost(String url, Object dto) {
        try {
            HttpPost post = getHttpPost(url);
            Map<String, String> authHeader = getAuthHeader();
            authHeader.forEach((k, v) -> {
                post.addHeader(k, v);
            });
            StringEntity stringEntity = new StringEntity(toJsonStr(dto), Charset.forName("UTF-8"));
            stringEntity.setContentType(AGENT_HTTP_APPLICATION_JSON);
            post.setEntity(stringEntity);
            CloseableHttpResponse response = httpClient.execute(post);
            String returnStr = EntityUtils.toString(response.getEntity());
            if (returnStr != null && !returnStr.isEmpty()
                    && response.getStatusLine().getStatusCode() == 200) {
                if (LOGGER.isDebugEnabled()) {
                    LOGGER.debug("request url {}, dto: {}, return str {}", url, dto, returnStr);
                }
                return returnStr;
            }
        } catch (Exception e) {
            LOGGER.error("request url {}, request dto {} error :" + e.getMessage(), url, dto);
            return null;
        }
        return null;
    }
doPost

@param dto content body needed to post
@return response
inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/utils/HttpManager.java