GetClient { public void get() throws IOException { String requesturl = "http: CloseableHttpClient httpclient = HttpClients.createDefault(); CloseableHttpResponse response = null; StringBuilder params = new StringBuilder(); params.append(requesturl + "?"); params.append("key=" + URLEncoder.encode("4b441cb500f431adc6cc0cb650b4a5d0", REQUEST_CHARSET)).append("&"); params.append("info=" + URLEncoder.encode("4b441cb500f431adc6cc0cb650b4a5d0", REQUEST_CHARSET)); try { httpclient.getParams().setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 10000); httpclient.getParams().setParameter(CoreConnectionPNames.SO_TIMEOUT, 10000); HttpGet httpGet = new HttpGet(params.toString()); response = httpclient.execute(httpGet); HttpEntity entity = response.getEntity(); String content = EntityUtils.toString(entity, "utf-8"); log.info(content); EntityUtils.consume(entity); } catch (Exception e) { log.error("" + e); } finally { if (response != null) response.close(); } }  void quickget(); void get(); void get2(); HttpParams getHttpParams(); void standard();  }
@Test public void testGet1() throws Exception { getClient.get(); }