fix: 选择raw类型body后,切换成kv请求头错误
This commit is contained in:
parent
94079cd283
commit
b37d6a15f2
|
@ -650,7 +650,7 @@ const JMX_ASSERTION_CONDITION = {
|
||||||
|
|
||||||
class JMXHttpRequest {
|
class JMXHttpRequest {
|
||||||
constructor(request, environment) {
|
constructor(request, environment) {
|
||||||
if (request && request instanceof HttpRequest && (request.url || request.path)) {
|
if (request && request instanceof HttpRequest) {
|
||||||
this.useEnvironment = request.useEnvironment;
|
this.useEnvironment = request.useEnvironment;
|
||||||
this.method = request.method;
|
this.method = request.method;
|
||||||
if (!request.useEnvironment) {
|
if (!request.useEnvironment) {
|
||||||
|
@ -843,7 +843,7 @@ class JMXGenerator {
|
||||||
|
|
||||||
addBodyFormat(request) {
|
addBodyFormat(request) {
|
||||||
let bodyFormat = request.body.format;
|
let bodyFormat = request.body.format;
|
||||||
if (bodyFormat) {
|
if (!request.body.isKV() && bodyFormat) {
|
||||||
switch (bodyFormat) {
|
switch (bodyFormat) {
|
||||||
case BODY_FORMAT.JSON:
|
case BODY_FORMAT.JSON:
|
||||||
this.addContentType(request, 'application/json');
|
this.addContentType(request, 'application/json');
|
||||||
|
|
Loading…
Reference in New Issue