feat: 请求body支持变量

This commit is contained in:
Captain.B 2020-08-11 10:22:19 +08:00
parent 8b2041bbd9
commit 2f1b8e9d1a
1 changed files with 3 additions and 0 deletions

View File

@ -937,6 +937,9 @@ class JMXGenerator {
let body = [];
if (request.body.isKV()) {
body = this.filterKV(request.body.kvs);
body.forEach(arg => {
arg.value = calculate(arg.value);
});
} else {
httpSamplerProxy.boolProp('HTTPSampler.postBodyRaw', true);
body.push({name: '', value: request.body.raw, encode: false});