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
jamesgeorge00713be809cfe84
diff --git a/pages/index.vue b/pages/index.vueindex 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')