From 6ca847bdde53660be0f224aaa3b5ccc8fc15613c Mon Sep 17 00:00:00 2001 From: NBTX Date: Fri, 30 Aug 2019 18:14:25 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=98=AC=20Actually=20send=20the=20request?= =?UTF-8?q?=20body?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 }); (() => {