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);