Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
minor refactor
jamesgeorge007901162c8b645
diff --git a/pages/index.vue b/pages/index.vueindex 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")