diff --git a/pages/index.vue b/pages/index.vue
index bc1c3f052..501be50c7 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -36,34 +36,40 @@
+
+ Raw Input
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
-
-
-
+
+
+
@@ -213,6 +219,8 @@
bearerToken: '',
params: [],
bodyParams: [],
+ rawParams: '',
+ rawInput: false,
contentType: 'application/json',
response: {
status: '',
@@ -244,6 +252,7 @@
return validIP.test(this.url) || validHostname.test(this.url);
},
rawRequestBody() {
+ debugger;
const {
bodyParams
} = this
@@ -329,7 +338,8 @@
xhr.setRequestHeader('Authorization', 'Bearer ' + this.bearerToken);
}
if (this.method === 'POST' || this.method === 'PUT') {
- const requestBody = this.rawRequestBody
+ debugger;
+ const requestBody = this.rawInput ? this.rawParams : this.rawRequestBody;
xhr.setRequestHeader('Content-Length', requestBody.length)
xhr.setRequestHeader('Content-Type', `${this.contentType}; charset=utf-8`)
xhr.send(requestBody)