Skip to content

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

Enable shareable requests with preseted attributes in url queries

yubathomd71a4ba0bba4
diff --git a/pages/index.vue b/pages/index.vue
index bfa91faa1..9c2818157 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -528,7 +528,15 @@
this.$refs.previewFrame.setAttribute('data-previewing-url', this.url);
}
}
+ },
+ setRouteQueries(queries) {
+ for (const key in queries) {
+ if (this[key]) this[key] = queries[key];
+ }
}
+ },
+ created() {
+ if (Object.keys(this.$route.query).length) this.setRouteQueries(this.$route.query);
}
}