You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "nic-chen (via GitHub)" <gi...@apache.org> on 2023/05/16 08:23:18 UTC

[GitHub] [apisix-java-plugin-runner] nic-chen commented on a diff in pull request #239: feat: `PostResponse` supports charset other than `UTF-8`

nic-chen commented on code in PR #239:
URL: https://github.com/apache/apisix-java-plugin-runner/pull/239#discussion_r1194797946


##########
runner-plugin-sdk/src/main/java/org/apache/apisix/plugin/runner/PostResponse.java:
##########
@@ -53,7 +57,7 @@ public ByteBuffer encode() {
 
         int bodyIndex = -1;
         if (StringUtils.hasText(body)) {
-            byte[] bodyBytes = body.getBytes(StandardCharsets.UTF_8);
+            byte[] bodyBytes = body.getBytes(charset);

Review Comment:
   ```suggestion
               byte[] bodyBytes = body.getBytes(this.charset);
   ```
   should be better?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org