private static void generateOutputExcelFile(String templateFilename) throws Exception{
URL url;
try {
url = new URL("http://api.longfor.sit/bpm3-carbon-sit/v1/api/iam/user/getUserListByRoleCode");
HttpURLConnection htc = (HttpURLConnection) url.openConnection();
htc.setDoInput(true);
htc.setDoOutput(true);
htc.setDefaultUseCaches(false);
htc.setRequestMethod("POST");
htc.setRequestProperty("Content-Type","application/json;charset=UTF-8");
htc.setRequestProperty("X-Gaia-Api-Key","46d096f0-2912-48c3-9733-7246f2690166");
String body="{\"roleCode\":\"RP.XZ.000211\"}";
OutputStream os = htc.getOutputStream();
os.write(body.getBytes());
os.flush();os.close();
BufferedReader br = new BufferedReader(new InputStreamReader(htc.getInputStream()));
String rl = br.readLine();
StringBuilder sb =new StringBuilder(rl);
JSONArray pa = JSON.parseArray(rl);
} catch (MalformedURLException e) {
// TODO 自动生成的 catch 块
e.printStackTrace();
}
}