From 16e3ceb8ad4c11ea75b64de49eda3b15e7d67012 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Thu, 5 Nov 2020 10:35:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20bo?= =?UTF-8?q?dy=20kv=E5=8F=82=E6=95=B0=E8=AF=B7=E6=B1=82=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/business/components/api/test/model/ScenarioModel.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/business/components/api/test/model/ScenarioModel.js b/frontend/src/business/components/api/test/model/ScenarioModel.js index 68b85efbd3..d86ea1b13d 100644 --- a/frontend/src/business/components/api/test/model/ScenarioModel.js +++ b/frontend/src/business/components/api/test/model/ScenarioModel.js @@ -1397,11 +1397,13 @@ class JMXGenerator { body = this.filterKV(request.body.kvs); this.addRequestBodyFile(httpSamplerProxy, request, testId); } else { - body.push({name: '', value: request.body.raw, encode: false, enable: true}); + 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)); } }