OldHttpClientApi { public void get() throws UnsupportedEncodingException { HttpClient client = new HttpClient(); String APIKEY = "4b441cb500f431adc6cc0cb650b4a5d0"; String INFO =new URLCodec().encode("who are you","utf-8"); String requesturl = "http: GetMethod getMethod = new GetMethod(requesturl); try { int stat = client.executeMethod(getMethod); if (stat != HttpStatus.SC_OK) log.error("get失败！"); byte[] responseBody = getMethod.getResponseBody(); String content=new String(responseBody ,"utf-8"); log.info(content); }catch (Exception e){ log.error(""+e.getLocalizedMessage()); }finally { getMethod.releaseConnection(); } }  void post(); void get(); void get2();  }
@Test public void testGet() throws Exception { old.get(); }