fix(接口测试): 修复query参数未拼接到url问题

--bug=1011784 --user=赵勇 【接口测试】场景-自定义请求,使用变量作为域名的时候,query参数拼不上 https://www.tapd.cn/55049933/s/1127331
This commit is contained in:
fit2-zhao 2022-03-29 17:14:55 +08:00 committed by 刘瑞斌
parent ab31ec2fe9
commit 76409e31b7
1 changed files with 22 additions and 27 deletions

View File

@ -466,12 +466,7 @@ public class MsHTTPSamplerProxy extends MsTestElement {
sampler.setProperty("HTTPSampler.path", envPath);
}
if (CollectionUtils.isNotEmpty(this.getArguments())) {
String path = envPath;
if (StringUtils.equalsIgnoreCase(this.getMethod(), "GET")) {
getQueryParameters(sampler);
} else {
path = postQueryParameters(envPath);
}
String path = postQueryParameters(envPath);
if (HTTPConstants.DELETE.equals(this.getMethod()) && !path.startsWith("${")) {
if (!path.startsWith("/")) {
path = "/" + path;