public <T> T doPost(String url, String jsonBody, Class<T> tClass) throws Throwable {
        long start = System.currentTimeMillis();
        CloseableHttpClient httpClient = getCloseableHttpClient();
        CloseableHttpResponse response = null;
        try {
            HttpPost httpPost = new HttpPost(url);
            RequestConfig requestConfig = parseRequestConfig();
            httpPost.setConfig(requestConfig);

            StringEntity requestEntity = new StringEntity(jsonBody, "utf-8");
            requestEntity.setContentEncoding("UTF-8");
            httpPost.setHeader("Content-type", "application/json");
            httpPost.setEntity(requestEntity);

            response = httpClient.execute(httpPost);
            HttpEntity entity = response.getEntity();
            if (LOGGER.isDebugEnabled()) {
                LOGGER.debug("http client post success. url: {}. latency: {}ms.", url, System.currentTimeMillis() -
                    start);
            }
            return JSON.parseObject(EntityUtils.toString(entity), tClass);
        } catch (Throwable throwable) {
            LOGGER.error(
                "http client post error. url: " + url + ", body: " + jsonBody + ". latency: " +
                    (System.currentTimeMillis() - start)
                    + "ms.", throwable);
            throw throwable;
        } finally {
            if (response != null) {
                try {
                    response.close();
                } catch (IOException e) {
                    LOGGER.error("http client post close response error.", e);
                }
            }
        }
    }
@author <a href=mailto:zhiyuan.lzy@antfin.com>zhiyuan.lzy</a>
core-impl/client/src/main/java/com/alipay/sofa/rpc/client/http/RpcHttpClient.java