Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

fix: add query from cURL import - fixed #1582

Liyas Thomasdb45f0890551
diff --git a/pages/index.vue b/pages/index.vue
index 44152ff8a..2d1479479 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -1681,6 +1681,16 @@ export default {
this.path = pathname
this.uri = this.url + this.path
this.headers = []
+ if (parsedCurl.query) {
+ for (const key of Object.keys(parsedCurl.query)) {
+ this.$store.commit("addParams", {
+ key,
+ value: parsedCurl.query[key],
+ type: "query",
+ active: true,
+ })
+ }
+ }
if (parsedCurl.headers) {
for (const key of Object.keys(parsedCurl.headers)) {
this.$store.commit("addHeaders", {