HttpUtils.sendPost()方法,参数无需拼接参数到url,否则会出现双份参数

请求url或form参数 会出现双份参数,并无法获取
{"token":["xxxxxxx","xxxxxxx"],"payType":["weixin","weixin"],"amount":["100","100"],"orderId":["123","123"]}
master
Live 5 years ago committed by Gitee
parent a2d1160205
commit 2daf89e0c6
  1. 2
      ruoyi/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java

@ -118,7 +118,7 @@ public class HttpUtils
StringBuilder result = new StringBuilder();
try
{
String urlNameString = url + "?" + param;
String urlNameString = url;
log.info("sendPost - {}", urlNameString);
URL realUrl = new URL(urlNameString);
URLConnection conn = realUrl.openConnection();

Loading…
Cancel
Save