From 9d4f63cfb069e8748d741b40efa9724856cdda1a Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Sun, 24 Apr 2022 17:32:50 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=9D=9EGET=E8=AF=B7=E6=B1=82=E7=9A=84?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BC=9A=E6=8A=8A=E8=AF=B7=E6=B1=82=E4=BD=93?= =?UTF-8?q?=E4=B8=AD=E7=9A=84kv=E6=95=B0=E6=8D=AE=E6=8B=BC=E6=8E=A5?= =?UTF-8?q?=E5=88=B0=E5=AD=97=E7=AC=A6=E4=B8=B2=E4=B8=8A=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1012619 --user=宋天阳 [接口测试]github#12899Mock完成设置后,选择执行,响应结果不是mock设置里的响应结果。 https://www.tapd.cn/55049933/s/1145825 --- .../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 32b12a4258..1e4e214253 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) { + if (this.body != null && StringUtils.equalsAnyIgnoreCase(method,"POST","PUT","PATCH")) { 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);