[PR #4412] [MERGED] feat: add the ability to configure query params encoding for requests #4786

Closed
opened 2026-03-17 02:17:35 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4412
Author: @Pranay-Pandey
Created: 10/7/2024
Status: Merged
Merged: 10/23/2024
Merged by: @jamesgeorge007

Base: nextHead: feat-param-encoding


📝 Commits (10+)

  • 42d2441 feat: add parameter encoding in requests
  • d5437f7 chore: add encode in schema validation
  • 1f5dff8 chore: add a section called general in settings
  • 331875b chore: add i18n texts
  • 15652ea chore: simplify if logic
  • 8d7a258 fix: preProcessRequest double encodeing bug
  • 74b4616 fix: preserve multiple values for the same query param key
  • d72f9dc chore: update copytext
  • 258bf61 fix: prevent tooltip message from getting clipped
  • d6c06a6 chore: add fallback for settings schema

📊 Changes

11 files changed (+187 additions, -108 deletions)

View changed files

📝 packages/hoppscotch-common/locales/en.json (+11 -1)
📝 packages/hoppscotch-common/src/components.d.ts (+1 -0)
packages/hoppscotch-common/src/components/smart/EncodingPicker.vue (+60 -0)
📝 packages/hoppscotch-common/src/newstore/settings.ts (+6 -0)
📝 packages/hoppscotch-common/src/pages/settings.vue (+47 -21)
📝 packages/hoppscotch-common/src/platform/std/interceptors/agent/index.ts (+1 -28)
📝 packages/hoppscotch-common/src/platform/std/interceptors/browser.ts (+2 -31)
📝 packages/hoppscotch-common/src/platform/std/interceptors/extension.ts (+1 -26)
packages/hoppscotch-common/src/platform/std/interceptors/helpers.ts (+54 -0)
📝 packages/hoppscotch-common/src/platform/std/interceptors/proxy.ts (+1 -1)
📝 packages/hoppscotch-common/src/services/persistence/validation-schemas/index.ts (+3 -0)

📄 Description

Closes #2829

Add optional setting of encoding the URL parameters in the request. A new setting option is introduced which can be toggled between auto, disable and auto.
Also have fixed the bug with preProcessRequest function where double encoding was happening.

What's changed

  • New setting section named General introduced and moved language, experiments section within
  • Encoding setting will decide whether to encode the URL parameters

Preview

image

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/4412 **Author:** [@Pranay-Pandey](https://github.com/Pranay-Pandey) **Created:** 10/7/2024 **Status:** ✅ Merged **Merged:** 10/23/2024 **Merged by:** [@jamesgeorge007](https://github.com/jamesgeorge007) **Base:** `next` ← **Head:** `feat-param-encoding` --- ### 📝 Commits (10+) - [`42d2441`](https://github.com/hoppscotch/hoppscotch/commit/42d24418a82931bd0c18ca8958da2423e334d995) feat: add parameter encoding in requests - [`d5437f7`](https://github.com/hoppscotch/hoppscotch/commit/d5437f71f0b57a3b30647f2d214d68c0f9d9843d) chore: add encode in schema validation - [`1f5dff8`](https://github.com/hoppscotch/hoppscotch/commit/1f5dff86c86fcf7dea480e3ee3ac06073b6af0be) chore: add a section called general in settings - [`331875b`](https://github.com/hoppscotch/hoppscotch/commit/331875b85931f61cfe690726ec6298d0c97a196b) chore: add i18n texts - [`15652ea`](https://github.com/hoppscotch/hoppscotch/commit/15652eae987a91f00d3aedffa1042c02f8260792) chore: simplify if logic - [`8d7a258`](https://github.com/hoppscotch/hoppscotch/commit/8d7a25831142b0df3bef4bf79f72e715213892c8) fix: preProcessRequest double encodeing bug - [`74b4616`](https://github.com/hoppscotch/hoppscotch/commit/74b4616dbb31827415d06262ac5f5f946c7b2eb4) fix: preserve multiple values for the same query param key - [`d72f9dc`](https://github.com/hoppscotch/hoppscotch/commit/d72f9dc0e07565ff010770d1e203878afba108c7) chore: update copytext - [`258bf61`](https://github.com/hoppscotch/hoppscotch/commit/258bf613f1a8cdcab9a0e9d7e8747d4efcdc97e5) fix: prevent tooltip message from getting clipped - [`d6c06a6`](https://github.com/hoppscotch/hoppscotch/commit/d6c06a62a5e58dd4b8005942e4639171e80e3c25) chore: add fallback for settings schema ### 📊 Changes **11 files changed** (+187 additions, -108 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/locales/en.json` (+11 -1) 📝 `packages/hoppscotch-common/src/components.d.ts` (+1 -0) ➕ `packages/hoppscotch-common/src/components/smart/EncodingPicker.vue` (+60 -0) 📝 `packages/hoppscotch-common/src/newstore/settings.ts` (+6 -0) 📝 `packages/hoppscotch-common/src/pages/settings.vue` (+47 -21) 📝 `packages/hoppscotch-common/src/platform/std/interceptors/agent/index.ts` (+1 -28) 📝 `packages/hoppscotch-common/src/platform/std/interceptors/browser.ts` (+2 -31) 📝 `packages/hoppscotch-common/src/platform/std/interceptors/extension.ts` (+1 -26) ➕ `packages/hoppscotch-common/src/platform/std/interceptors/helpers.ts` (+54 -0) 📝 `packages/hoppscotch-common/src/platform/std/interceptors/proxy.ts` (+1 -1) 📝 `packages/hoppscotch-common/src/services/persistence/validation-schemas/index.ts` (+3 -0) </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (docs, feature, etc.) and keep it as small as possible. You can open multiple prs instead of opening a huge one. --> <!-- If this pull request closes an issue, please mention the issue number below --> Closes [#2829](https://github.com/hoppscotch/hoppscotch/issues/2829) <!-- Issue # here --> <!-- Add an introduction into what this PR tries to solve in a couple of sentences --> Add optional setting of encoding the URL parameters in the request. A new setting option is introduced which can be toggled between auto, disable and auto. Also have fixed the bug with [preProcessRequest](https://github.com/pranay-pandey/hoppscotch/blob/e3a298003d023ae6f50e14799a4916c9288812ef/packages/hoppscotch-common/src/platform/std/interceptors/browser.ts#L21) function where double encoding was happening. ### What's changed <!-- Describe point by point the different things you have changed in this PR --> - New setting section named `General` introduced and moved language, experiments section within - Encoding setting will decide whether to encode the URL parameters <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> ### Preview <img width="1430" alt="image" src="https://github.com/user-attachments/assets/7beb87eb-2bce-43dd-85a6-d7d0710666d3"> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:17:35 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4786
No description provided.