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
Merge branch 'master' into master
Nityananda Gohaind4bffba010f4
diff --cc pages/index.vueindex f39619340,58e50bbaf..8dba39050--- a/pages/index.vue+++ b/pages/index.vue@@@ -860,23 -906,20 +906,23 @@@let textarea = document.getElementById("import-text")let text = textarea.value;try {- let parsedCurl = parseCurlCommand(text);- this.url = parsedCurl.url.replace(/"/g, "").replace(/'/g, "");- this.url = this.url[this.url.length - 1] == '/' ? this.url.slice(0, -1) : this.url;- this.path = "";- this.headers- this.showModal = false;- this.headers = [];+ let parsedCurl = parseCurlCommand(text);+ this.url = parsedCurl.url.replace(/"/g,"").replace(/'/g,"");+ this.url = this.url[this.url.length -1] == '/' ? this.url.slice(0, -1): this.url;+ this.path = "";+ this.headers = [];for (const key of Object.keys(parsedCurl.headers)) {- this.headers.push({- key: key,- value: parsedCurl.headers[key]- })+ this.headers.push({+ key: key,+ value: parsedCurl.headers[key]+ })}this.method = parsedCurl.method.toUpperCase();+ if (parsedCurl["data"]){+ this.rawInput = true;+ this.rawParams = parsedCurl["data"];+ }+ this.showModal = false;} catch (error) {this.showModal = false;}