fix: 接口定义har格式导入无cmotentType报错误

This commit is contained in:
chenjianxing 2021-09-16 12:45:45 +08:00 committed by jianxing
parent 4688324abc
commit 9afe9da9c5
1 changed files with 4 additions and 0 deletions

View File

@ -63,6 +63,10 @@ public abstract class ApiImportAbstractParser<T> implements ApiImportParser<T> {
protected String getBodyType(String contentType) { protected String getBodyType(String contentType) {
String bodyType = ""; String bodyType = "";
if (StringUtils.isBlank(contentType)) {
return bodyType;
}
switch (contentType) { switch (contentType) {
case "application/x-www-form-urlencoded": case "application/x-www-form-urlencoded":
bodyType = Body.WWW_FROM; bodyType = Body.WWW_FROM;