We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb6f0dd commit 88f8d5bCopy full SHA for 88f8d5b
src/test/java/com/wechat/pay/contrib/apache/httpclient/HttpClientBuilderTest.java
@@ -129,9 +129,10 @@ public void postNonRepeatableEntityTest() throws IOException {
129
public void postRepeatableEntityTest() throws IOException {
130
HttpPost httpPost = new HttpPost(
131
"https://api.mch.weixin.qq.com/v3/marketing/favor/users/oHkLxt_htg84TUEbzvlMwQzVDBqo/coupons");
132
+
133
+ // NOTE: 建议指定charset=utf-8。低于4.4.6版本的HttpCore,不能正确的设置字符集,可能导致签名错误
134
StringEntity reqEntity = new StringEntity(
135
reqdata, ContentType.create("application/json", "utf-8"));
- reqEntity.setContentType("application/json");
136
httpPost.setEntity(reqEntity);
137
httpPost.addHeader("Accept", "application/json");
138
0 commit comments