diff --git a/backend/src/main/java/io/metersphere/api/parse/ApiImportAbstractParser.java b/backend/src/main/java/io/metersphere/api/parse/ApiImportAbstractParser.java index f2b3fa6ce5..1d686768ee 100644 --- a/backend/src/main/java/io/metersphere/api/parse/ApiImportAbstractParser.java +++ b/backend/src/main/java/io/metersphere/api/parse/ApiImportAbstractParser.java @@ -63,6 +63,10 @@ public abstract class ApiImportAbstractParser implements ApiImportParser { protected String getBodyType(String contentType) { String bodyType = ""; + if (StringUtils.isBlank(contentType)) { + return bodyType; + } + switch (contentType) { case "application/x-www-form-urlencoded": bodyType = Body.WWW_FROM;