diff --git a/backend/src/main/java/io/metersphere/api/service/MockConfigService.java b/backend/src/main/java/io/metersphere/api/service/MockConfigService.java index e410593b77..4b20ccb71c 100644 --- a/backend/src/main/java/io/metersphere/api/service/MockConfigService.java +++ b/backend/src/main/java/io/metersphere/api/service/MockConfigService.java @@ -1202,7 +1202,9 @@ public class MockConfigService { response.setStatus(responseDTO.getReturnCode()); if (MapUtils.isNotEmpty(responseDTO.getHeaders())) { for (Map.Entry entry : responseDTO.getHeaders().entrySet()) { - response.setHeader(entry.getKey(), entry.getValue()); + if(StringUtils.isNotEmpty(entry.getKey())){ + response.setHeader(entry.getKey(), entry.getValue()); + } } } } catch (Exception e) { diff --git a/frontend/src/business/components/api/definition/components/mock/MockEditDrawer.vue b/frontend/src/business/components/api/definition/components/mock/MockEditDrawer.vue index b87d6f06de..df7dfc5524 100644 --- a/frontend/src/business/components/api/definition/components/mock/MockEditDrawer.vue +++ b/frontend/src/business/components/api/definition/components/mock/MockEditDrawer.vue @@ -93,7 +93,7 @@ export default { arguments: [], rest: [], body: { - type: 'JSON', + type: 'Form Data', binary: [], kvs: [], }