Skip to content

Commit 8f5a9e0

Browse files
authored
🐛 #1547 修复小程序二维码创建参数包含中文时出现乱码的问题
1 parent eb38e86 commit 8f5a9e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/util/QrcodeRequestExecutor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public File execute(String uri, AbstractWxMaQrcodeWrapper qrcodeWrapper, WxType
4848
);
4949
}
5050

51-
httpPost.setEntity(new StringEntity(qrcodeWrapper.toJson()));
51+
httpPost.setEntity(new StringEntity(qrcodeWrapper.toJson(), ContentType.APPLICATION_JSON));
5252

5353
try (final CloseableHttpResponse response = requestHttp.getRequestHttpClient().execute(httpPost);
5454
final InputStream inputStream = InputStreamResponseHandler.INSTANCE.handleResponse(response)) {

0 commit comments

Comments
 (0)