Commit 2b9c9432 authored by 赵啸非's avatar 赵啸非

添加站点参数

parent 19461e87
...@@ -163,14 +163,15 @@ public class MidSignApiController { ...@@ -163,14 +163,15 @@ public class MidSignApiController {
headerMap.entrySet().forEach(item->{ headerMap.entrySet().forEach(item->{
log.info("{}={} \n", item.getKey(), item.getValue()); log.info("{}={} \n", item.getKey(), item.getValue());
}); });
JSONObject reqBody = new JSONObject();
reqBody.put("request", request);
//请求转发 //请求转发
String fullUrl = UrlBuilder.ofHttp(midUrl).addPath(midReq.getPath()).build(); String fullUrl = UrlBuilder.ofHttp(midUrl).addPath(midReq.getPath()).build();
//String fullUrl = URLUtil.completeUrl(midUrl, midReq.getPath()); //String fullUrl = URLUtil.completeUrl(midUrl, midReq.getPath());
// log.info("mid url:{},body:{}", fullUrl, headerMap.get("body")); // log.info("mid url:{},body:{}", fullUrl, headerMap.get("body"));
log.info("url:{} \n body:{}", fullUrl, request); log.info("url:{} \n body:{} \n", fullUrl, reqBody.toJSONString());
String body = HttpUtil.createRequest(Method.POST, fullUrl).headerMap(headerMap, true).body(headerMap.get("body")).execute().body(); //String body = HttpUtil.createRequest(Method.POST, fullUrl).headerMap(headerMap, true).body(headerMap.get("body")).execute().body();
//String body = HttpUtil.createRequest(Method.POST, fullUrl).headerMap(headerMap, true).body(reqBody.toJSONString()).execute().body(); String body = HttpUtil.createRequest(Method.POST, fullUrl).headerMap(headerMap, true).body(reqBody.toJSONString()).execute().body();
JSONObject bodyJson = JSONObject.parseObject(body); JSONObject bodyJson = JSONObject.parseObject(body);
log.info("mid resp:" + bodyJson.toJSONString()); log.info("mid resp:" + bodyJson.toJSONString());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment