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 00662bf1..973f177d 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 @@ private static RequestBody buildRequestBody(Object body, RestHeaders headers) { if (RestHeaders.APPLICATION_JSON.equals(contentType)) { if (body == null) { bodyContent = "{}"; + } else if (body instanceof String) { + bodyContent = (String) body; } else { bodyContent = JsonUtilCommon.toJson(body); }