Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

Commit dcf3752

Browse files
authored
fix the json param convert (#137)
1 parent 10f0a87 commit dcf3752

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

hugegraph-common/src/main/java/org/apache/hugegraph/rest/AbstractRestClient.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ private static RequestBody buildRequestBody(Object body, RestHeaders headers) {
127127
if (RestHeaders.APPLICATION_JSON.equals(contentType)) {
128128
if (body == null) {
129129
bodyContent = "{}";
130+
} else if (body instanceof String) {
131+
bodyContent = (String) body;
130132
} else {
131133
bodyContent = JsonUtilCommon.toJson(body);
132134
}

0 commit comments

Comments
 (0)