HttpUtils.sendPost()方法,参数无需拼接参数到url,否则会出现双份参数
请求url或form参数 会出现双份参数,并无法获取 {"token":["xxxxxxx","xxxxxxx"],"payType":["weixin","weixin"],"amount":["100","100"],"orderId":["123","123"]}
This commit is contained in:
parent
a2d1160205
commit
2daf89e0c6
@ -118,7 +118,7 @@ public class HttpUtils
|
|||||||
StringBuilder result = new StringBuilder();
|
StringBuilder result = new StringBuilder();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
String urlNameString = url + "?" + param;
|
String urlNameString = url;
|
||||||
log.info("sendPost - {}", urlNameString);
|
log.info("sendPost - {}", urlNameString);
|
||||||
URL realUrl = new URL(urlNameString);
|
URL realUrl = new URL(urlNameString);
|
||||||
URLConnection conn = realUrl.openConnection();
|
URLConnection conn = realUrl.openConnection();
|
||||||
|
Loading…
Reference in New Issue
Block a user