public static TextHttpResponse post_response(String url,
	    Map<String, String> params, String incode) {
	Header[] heads = null;
	HttpClient http = SingleHttpClient.getInstance();
	HttpResponse response = null;
	TextHttpResponse out = new TextHttpResponse();
	try {
	    // (1)创建查询参数
	    List<NameValuePair> paramss = new ArrayList<NameValuePair>();
	    if (params != null && !params.isEmpty()) {
		Set<String> keyset = params.keySet();
		Iterator<String> it = keyset.iterator();
		while (it.hasNext()) {
		    String key = it.next();
		    String value = params.get(key);
		    paramss.add(new BasicNameValuePair(key, value));
		}
	    }

	    if (StringUtils.isEmpty(incode)) {
		incode = CharSets.UTF_8;
	    }

	    // (2) 创建post实例
	    HttpPost post = new HttpPost(url);
	    post.setEntity(new UrlEncodedFormEntity(paramss, incode));

	    // 设置cookie策略
	    post.getParams().setParameter(ClientPNames.COOKIE_POLICY,
		    CookiePolicy.BROWSER_COMPATIBILITY);

	    // (2) 使用HttpClient发送post请求，获得返回结果HttpResponse
	    Header[] hh = post.getAllHeaders();
	    response = http.execute(post);

	    // (3) 读取返回结果
	    HttpEntity entity = response.getEntity();
	    String out_str = EntityUtils.toString(entity);
	    out.setContent(out_str);

	    if (response.getStatusLine().getStatusCode() != 200) {
		throw new RuntimeException(out_str);
	    }

	    // 取得heads
	    heads = response.getAllHeaders();
	    out.setHeaders(heads);

	    // Dump.dump(out_str_2);

	} catch (Exception e) {
	    e.printStackTrace();
	} finally {
	    HttpClientUtils.closeQuietly(response);
	}
	return out;
    }