字符编码字符串用常量替换
This commit is contained in:
@@ -491,7 +491,7 @@ public class WxPayServiceImpl implements WxPayService {
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
|
||||
try (CloseableHttpClient httpclient = HttpClients.custom().setSSLSocketFactory(sslsf).build()) {
|
||||
httpPost.setEntity(new StringEntity(new String(requestStr.getBytes("UTF-8"), "ISO-8859-1")));
|
||||
httpPost.setEntity(new StringEntity(new String(requestStr.getBytes(CharEncoding.UTF_8), CharEncoding.ISO_8859_1)));
|
||||
try (CloseableHttpResponse response = httpclient.execute(httpPost)) {
|
||||
String result = EntityUtils.toString(response.getEntity(), Consts.UTF_8);
|
||||
this.log.debug("\n[URL]: {}\n[PARAMS]: {}\n[RESPONSE]: {}", url, requestStr, result);
|
||||
|
||||
Reference in New Issue
Block a user