public static String post(RequestParameter parameter, int timeout,
			String content) {

		HttpPost post = new HttpPost(parameter.getUrl());
		String responseString = null;
		try {
			log.error("-------post---------------------------------------------------------");
			log.error(parameter.getUrl() + "\t" + timeout + "\t"
					+ parameter.getDecoding() + "\t" + parameter.getEncoding()
					+ "\t" + parameter.getContentType());
			// log.error(content);
			if (!StringUtils.isEmpty(parameter.getContentType())) {
				post.setHeader("Content-type", parameter.getContentType());
			}
			RequestConfig requestConfig = RequestConfig.custom()
					.setSocketTimeout(timeout).setConnectTimeout(timeout)
					.setConnectionRequestTimeout(timeout)
					.setExpectContinueEnabled(false).build();
			post.setConfig(requestConfig);
			if (!StringUtils.isEmpty(parameter.getEncoding())) {
				post.setEntity(new StringEntity(content, parameter
						.getEncoding()));
			}
			CloseableHttpResponse response = httpclient.execute(post);
			try {
				HttpEntity entity = response.getEntity();
				try {
					if (entity != null) {
						if (StringUtils.isEmpty(parameter.getDecoding())) {
							responseString = EntityUtils.toString(entity);
						} else {
							responseString = EntityUtils.toString(entity,
									parameter.getDecoding());
						}
						log.error(responseString);

					}

				} finally {
					if (entity != null) {
						entity.getContent().close();
					}

				}
			} finally {
				if (response != null) {
					response.close();
				}
			}

		} catch (UnsupportedEncodingException e) {
			throw new PayException(ResponseCode.SYSTEM_ERROR, e);
		} catch (Exception e) {
			throw new PayException(ResponseCode.SYSTEM_ERROR, e);
		} finally {
			post.releaseConnection();
		}
		return responseString;

	}