public static String postForm(String url, int timeout, Map<String, Object> headerMap, List<NameValuePair> paramsList, String encoding){
        HttpPost post = new HttpPost(url);
        try {
        	if(headerMap != null){
        		for(Entry<String, Object> entry : headerMap.entrySet()){
        			post.setHeader(entry.getKey(), entry.getValue().toString());
                }
        	}
            //post.setHeader("Content-type", "application/json");
            RequestConfig requestConfig = RequestConfig.custom()
                    .setSocketTimeout(timeout)
                    .setConnectTimeout(timeout)
                    .setConnectionRequestTimeout(timeout)
                    .setExpectContinueEnabled(false).build();
            post.setConfig(requestConfig);

            post.setEntity(new UrlEncodedFormEntity(paramsList, encoding));
            CloseableHttpResponse response = httpclient.execute(post);
            try {
                HttpEntity entity = response.getEntity();
                try {
                    if(entity != null){
                        String str = EntityUtils.toString(entity, encoding);
                        return str;
                    }
                } finally {
                    if(entity != null){
                        entity.getContent().close();
                    }
                }
            } finally {
                if(response != null){
                    response.close();
                }
            }
        } catch (Exception e) {
            throw new RuntimeException("invoke http post error!",e);
        } finally {
            post.releaseConnection();
        }
        return "";
    }
@param url
@param timeout
@param headerMap
@param paramsList
@param encoding
@return
dss-apps/dss-data-governance/dss-data-governance-common/src/main/java/com/webank/wedatasphere/dss/data/common/utils/HttpClientUtil.java