-
+
+
+
+
@@ -53,7 +58,17 @@
data() {
return {
- visible: false
+ visible: false,
+ useHeadersOption: [
+ {label: 'Body',value:'false'},
+ {label: 'Request Headers',value:'request_headers'},
+ {label: 'Body (unescaped)', value:'unescaped'},
+ {label: 'Body as a Document', value:'as_document'},
+ {label: 'Response Headers', value:'true'},
+ {label: 'URL', value:'URL'},
+ {label: 'Response Code', value:'code'},
+ {label: 'Response Message', value:'message'}
+ ]
}
},
diff --git a/frontend/src/business/components/api/test/model/ScenarioModel.js b/frontend/src/business/components/api/test/model/ScenarioModel.js
index c50913b513..3932e5a099 100644
--- a/frontend/src/business/components/api/test/model/ScenarioModel.js
+++ b/frontend/src/business/components/api/test/model/ScenarioModel.js
@@ -344,6 +344,7 @@ export class ExtractCommon extends ExtractType {
constructor(type, options) {
super(type);
this.variable = undefined;
+ this.useHeaders = undefined;
this.value = ""; // ${variable}
this.expression = undefined;
this.description = undefined;
@@ -562,7 +563,7 @@ class JMXGenerator {
switch (extractCommon.type) {
case EXTRACT_TYPE.REGEX:
testName += " RegexExtractor";
- props.headers = "false"; // 对应jMeter body
+ props.headers = extractCommon.useHeaders; // 对应jMeter body
props.template = "$1$";
return new RegexExtractor(testName, props);
case EXTRACT_TYPE.JSON_PATH: