fix(接口测试): body kv参数请求异常

This commit is contained in:
chenjianxing 2020-11-05 10:35:16 +08:00
parent 5303b19d08
commit 16e3ceb8ad
1 changed files with 4 additions and 2 deletions

View File

@ -1397,11 +1397,13 @@ class JMXGenerator {
body = this.filterKV(request.body.kvs);
this.addRequestBodyFile(httpSamplerProxy, request, testId);
} else {
if (request.body.raw) {
httpSamplerProxy.boolProp('HTTPSampler.postBodyRaw', true);
body.push({name: '', value: request.body.raw, encode: false, enable: true});
}
}
if (request.method !== 'GET') {
httpSamplerProxy.boolProp('HTTPSampler.postBodyRaw', true);
httpSamplerProxy.add(new HTTPSamplerArguments(body));
}
}