diff --git a/continew-starter-log/continew-starter-log-httptrace-pro/src/main/java/top/charles7c/continew/starter/log/httptracepro/handler/RecordableServletHttpRequest.java b/continew-starter-log/continew-starter-log-httptrace-pro/src/main/java/top/charles7c/continew/starter/log/httptracepro/handler/RecordableServletHttpRequest.java index 8afd6134..87dc6895 100644 --- a/continew-starter-log/continew-starter-log-httptrace-pro/src/main/java/top/charles7c/continew/starter/log/httptracepro/handler/RecordableServletHttpRequest.java +++ b/continew-starter-log/continew-starter-log-httptrace-pro/src/main/java/top/charles7c/continew/starter/log/httptracepro/handler/RecordableServletHttpRequest.java @@ -80,9 +80,10 @@ public final class RecordableServletHttpRequest implements RecordableHttpRequest public String getBody() { ContentCachingRequestWrapper wrapper = WebUtils.getNativeRequest(request, ContentCachingRequestWrapper.class); if (null != wrapper) { - return StrUtil.utf8Str(wrapper.getContentAsByteArray()); + String body = StrUtil.utf8Str(wrapper.getContentAsByteArray()); + return JSONUtil.isTypeJSON(body) ? body : null; } - return StringConstants.EMPTY; + return null; } @Override