From 13be809cfe84d7e5d5dbdf328c36422efd72f17f Mon Sep 17 00:00:00 2001 From: jamesgeorge007 Date: Mon, 23 Sep 2019 23:58:52 +0530 Subject: [PATCH] minor refactor --- pages/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.vue b/pages/index.vue index 5b6d084c9..838e00afc 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -632,7 +632,7 @@ } else if (this.auth === 'Bearer Token') { headers.push(' "Authorization": "Bearer Token ' + this.bearerToken + ',\n') } - if (this.method === 'POST' || this.method === 'PUT') { + if (['POST', 'PUT'].includes(this.method)]) { const requestBody = this.rawInput ? this.rawParams : this.rawRequestBody; requestString.push(' body: ' + requestBody + ',\n') headers.push(' "Content-Length": ' + requestBody.length + ',\n')