fix(接口测试): 修复自定义请求的参数没有拼接到url上的缺陷

--bug=1025621 --user=王孝刚 【接口测试】github#23805,接口自动化自定义get请求,请求体选择
x-www-form-urlencoded ,值没有没有拼接到URL上。
https://www.tapd.cn/55049933/s/1365843
This commit is contained in:
wxg0103 2023-04-23 17:19:29 +08:00 committed by 刘瑞斌
parent 888b236bee
commit da5fc902cb
1 changed files with 2 additions and 1 deletions

View File

@ -473,8 +473,9 @@ public class MsHTTPSamplerProxy extends MsTestElement {
sampler.setPort(urlObject.getPort());
}
sampler.setProtocol(urlObject.getProtocol());
sampler.setProperty("HTTPSampler.path", URLDecoder.decode(url, StandardCharsets.UTF_8.name()), StandardCharsets.UTF_8.name());
sampler.setProperty("HTTPSampler.path", URLDecoder.decode(urlObject.getPath(), StandardCharsets.UTF_8.name()), StandardCharsets.UTF_8.name());
} catch (Exception e) {
sampler.setProperty("HTTPSampler.path", url);
LogUtil.error(e.getMessage(), e);
}
}