From 50e53777bec293beae97ec59df6fa0eb9ddd584e Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Thu, 5 May 2022 16:43:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8DDELETE=E8=AF=B7=E6=B1=82Body=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=9C=AA=E7=94=9F=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1012990 --user=赵勇 [接口测试]github#13240DELETE方法的接口,body体无效 https://www.tapd.cn/55049933/s/1152908 --- .../api/dto/definition/request/sampler/MsHTTPSamplerProxy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java index 462ae2509d..300ff8e807 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java @@ -188,7 +188,7 @@ public class MsHTTPSamplerProxy extends MsTestElement { setSamplerPath(config, httpConfig, sampler); // 请求体处理 - if (this.body != null && StringUtils.equalsAnyIgnoreCase(method, "POST", "PUT", "PATCH")) { + if (this.body != null && !StringUtils.equalsAnyIgnoreCase(method, "GET")) { List bodyParams = this.body.getBodyParams(sampler, this.getId()); if (StringUtils.isNotEmpty(this.body.getType()) && "Form Data".equals(this.body.getType())) { AtomicBoolean kvIsEmpty = new AtomicBoolean(true);