fix(接口测试): 修复 post url 格式不对的问题
This commit is contained in:
parent
bf414059fa
commit
f1b8bf4c9f
|
@ -149,9 +149,14 @@ public class JmeterDocumentParser {
|
|||
String path = ele.getTextContent();
|
||||
Map<String, String> parser = parserUrl(path);
|
||||
String url = parser.get("URL");
|
||||
String params = parser.keySet().stream().filter(k -> !"URL".equals(k)).reduce("", (u, k) -> {
|
||||
String params = parser.keySet().stream().filter(k -> !"URL".equals(k)).reduce("?", (u, k) -> {
|
||||
String v = parser.get(k);
|
||||
u += "&" + k + "=" + ScriptEngineUtils.calculate(v);
|
||||
if ("?".equals(u)) {
|
||||
u += "";
|
||||
} else {
|
||||
u += "&";
|
||||
}
|
||||
u += k + "=" + ScriptEngineUtils.calculate(v);
|
||||
return u;
|
||||
});
|
||||
ele.setTextContent(url + params);
|
||||
|
|
Loading…
Reference in New Issue