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

请求url或form参数 会出现双份参数,并无法获取
{"token":["xxxxxxx","xxxxxxx"],"payType":["weixin","weixin"],"amount":["100","100"],"orderId":["123","123"]}
This commit is contained in:
Live 2020-06-10 18:30:17 +08:00 committed by Gitee
parent a2d1160205
commit 2daf89e0c6

View File

@ -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();