fix: 选择raw类型body后,切换成kv请求头错误

This commit is contained in:
chenjianxing 2020-08-11 11:15:16 +08:00
parent 94079cd283
commit b37d6a15f2
1 changed files with 2 additions and 2 deletions

View File

@ -650,7 +650,7 @@ const JMX_ASSERTION_CONDITION = {
class JMXHttpRequest {
constructor(request, environment) {
if (request && request instanceof HttpRequest && (request.url || request.path)) {
if (request && request instanceof HttpRequest) {
this.useEnvironment = request.useEnvironment;
this.method = request.method;
if (!request.useEnvironment) {
@ -843,7 +843,7 @@ class JMXGenerator {
addBodyFormat(request) {
let bodyFormat = request.body.format;
if (bodyFormat) {
if (!request.body.isKV() && bodyFormat) {
switch (bodyFormat) {
case BODY_FORMAT.JSON:
this.addContentType(request, 'application/json');