CloseableHttpClient client = HttpClients.createDefault(); HttpPost httpPost = new HttpPost(url); //设置参数
JSONObject params = new JSONObject();
params.put("pSaleSeason", handleSaleSeasonCode);
params.put("cSaleSeason", seasonCode);
params.put("discount", discount);
httpPost.setEntity(new StringEntity(params.toString(), ContentType.APPLICATION_JSON));
CloseableHttpResponse planResp = client.execute(httpPost); String responseBody = EntityUtils.toString(planResp.getEntity()); log.info("response body:" + responseBody); planResp.close(); response.setContentType("text/json;charset=UTF-8"); response.setDateHeader("Expires", 1L); response.addHeader("Pragma", "no-cache"); response.setHeader("Cache-Control", "no-cache, no-store, max-age=0"); JSONObject jsonNode = new JSONObject(); if (pl