public static TextHttpResponse get_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));
		}
	    }

	    String queryString = "";
	    if (StringUtils.isNotEmpty(incode)) {
		queryString = URLEncodedUtils.format(paramss, incode);
	    } else {
		queryString = URLEncodedUtils.format(paramss, CharSets.UTF_8);
	    }

	    // (2) 创建Get实例
	    URIBuilder uriBuilder = new URIBuilder(url);
	    uriBuilder.setQuery(queryString);
	    URI uri = uriBuilder.build();
	    HttpGet get = new HttpGet(uri);

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

	    // (2) 使用HttpClient发送get请求，获得返回结果HttpResponse
	    response = http.execute(get);
	    HttpEntity entity = response.getEntity();
	    String out_str = EntityUtils.toString(entity);
	    out.setContent(out_str);

	    if (response.getStatusLine().getStatusCode() != 200) {

		throw new RuntimeException(out_str);
	    }

	    // 获取所有的响应http头
	    heads = response.getAllHeaders();
	    out.setHeaders(heads);

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

	return out;

    }