From 901162c8b645a2875fca49d2834bf0bf309b820a Mon Sep 17 00:00:00 2001 From: jamesgeorge007 Date: Mon, 23 Sep 2019 23:59:24 +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 838e00afc..e25fb267d 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -672,7 +672,7 @@ requestString.push(" -H '" + element.key + ": " + element.value + "' \\\n"); }) } - if (this.method === 'POST' || this.method === 'PUT') { + if (['POST', 'PUT'].includes(this.method)]) { const requestBody = this.rawInput ? this.rawParams : this.rawRequestBody; requestString.push(" -H 'Content-Length: " + requestBody.length + "' \\\n") requestString.push(" -H 'Content-Type: " + this.contentType + "; charset=utf-8' \\\n")