Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

😬 Actually send the request body

NBTX6ca847bdde53
diff --git a/pages/index.vue b/pages/index.vue
index 3c56eebcc..d782a9b0b 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -378,8 +378,9 @@
// If the request has a request body, we want to ensure Content-Length and
// Content-Type are sent.
+ let requestBody;
if (this.hasRequestBody) {
- const requestBody = this.rawInput ? this.rawParams : this.rawRequestBody;
+ requestBody = this.rawInput ? this.rawParams : this.rawRequestBody;
Object.assign(headers, {
'Content-Length': requestBody.length,
@@ -406,7 +407,8 @@
method: this.method,
url: this.url + this.path + this.queryString,
auth,
- headers
+ headers,
+ data: requestBody
});
(() => {