public static void main(String[] args) { String host = "https://data.06api.com"; String path = "/api.php"; String key = "密钥"; String type = "接口标识"; String method = "GET"; Map headers = new HashMap(); Map querys = new HashMap(); querys.put("key", key); querys.put("type", type); querys.put("sn", "串号"); try { HttpResponse response = HttpUtils.doGet(host, path, method, headers, querys); System.out.println(response.toString()); //获取response的body System.out.println(EntityUtils.toString(response.getEntity())); } catch (Exception e) { e.printStackTrace(); } }