diff --git a/api-test/backend/src/main/java/io/metersphere/commons/utils/mock/MockApiUtils.java b/api-test/backend/src/main/java/io/metersphere/commons/utils/mock/MockApiUtils.java index 4b9d37a92e..f13b31db27 100644 --- a/api-test/backend/src/main/java/io/metersphere/commons/utils/mock/MockApiUtils.java +++ b/api-test/backend/src/main/java/io/metersphere/commons/utils/mock/MockApiUtils.java @@ -371,7 +371,7 @@ public class MockApiUtils { } catch (Exception e) { LogUtil.error(e); } - } else if (StringUtils.startsWithIgnoreCase(request.getContentType(), "text/xml")) { + } else if (StringUtils.startsWithIgnoreCase(request.getContentType(), "text/xml") || StringUtils.startsWithIgnoreCase(request.getContentType(), "application/xml")) { mockParams.setParamType(MockRequestType.XML.name()); String xmlString = readXml(request); JSONObject xmlJsonObject = XMLUtil.xmlStringToJSONObject(xmlString);