This is an automated email from the ASF dual-hosted git repository.

ming pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-hugegraph-commons.git


The following commit(s) were added to refs/heads/master by this push:
     new dcf3752  fix the json param convert (#137)
dcf3752 is described below

commit dcf37525153c87ba31106e35f9866f94a5977913
Author: 小宇 <[email protected]>
AuthorDate: Tue Dec 5 10:56:12 2023 +0800

    fix the json param convert (#137)
---
 .../src/main/java/org/apache/hugegraph/rest/AbstractRestClient.java     | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/hugegraph-common/src/main/java/org/apache/hugegraph/rest/AbstractRestClient.java
 
b/hugegraph-common/src/main/java/org/apache/hugegraph/rest/AbstractRestClient.java
index 00662bf..973f177 100644
--- 
a/hugegraph-common/src/main/java/org/apache/hugegraph/rest/AbstractRestClient.java
+++ 
b/hugegraph-common/src/main/java/org/apache/hugegraph/rest/AbstractRestClient.java
@@ -127,6 +127,8 @@ public abstract class AbstractRestClient implements 
RestClient {
         if (RestHeaders.APPLICATION_JSON.equals(contentType)) {
             if (body == null) {
                 bodyContent = "{}";
+            } else if (body instanceof String) {
+                bodyContent = (String) body;
             } else {
                 bodyContent = JsonUtilCommon.toJson(body);
             }

Reply via email to