feat(接口测试): 修复非GET请求的接口会把请求体中的kv数据拼接到字符串上的问题
--bug=1012619 --user=宋天阳 [接口测试]github#12899Mock完成设置后,选择执行,响应结果不是mock设置里的响应结果。 https://www.tapd.cn/55049933/s/1145825
This commit is contained in:
parent
121a04da51
commit
9d4f63cfb0
|
@ -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<KeyValue> bodyParams = this.body.getBodyParams(sampler, this.getId());
|
||||
if (StringUtils.isNotEmpty(this.body.getType()) && "Form Data".equals(this.body.getType())) {
|
||||
AtomicBoolean kvIsEmpty = new AtomicBoolean(true);
|
||||
|
|
Loading…
Reference in New Issue