mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-24 07:23:01 +08:00
字符编码字符串用常量替换
This commit is contained in:
parent
6847a41759
commit
bf2b4eed55
@ -491,7 +491,7 @@ public class WxPayServiceImpl implements WxPayService {
|
|||||||
HttpPost httpPost = new HttpPost(url);
|
HttpPost httpPost = new HttpPost(url);
|
||||||
|
|
||||||
try (CloseableHttpClient httpclient = HttpClients.custom().setSSLSocketFactory(sslsf).build()) {
|
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)) {
|
try (CloseableHttpResponse response = httpclient.execute(httpPost)) {
|
||||||
String result = EntityUtils.toString(response.getEntity(), Consts.UTF_8);
|
String result = EntityUtils.toString(response.getEntity(), Consts.UTF_8);
|
||||||
this.log.debug("\n[URL]: {}\n[PARAMS]: {}\n[RESPONSE]: {}", url, requestStr, result);
|
this.log.debug("\n[URL]: {}\n[PARAMS]: {}\n[RESPONSE]: {}", url, requestStr, result);
|
||||||
|
Loading…
Reference in New Issue
Block a user