Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-encode query parameters #23

Open
Hegi opened this issue Apr 24, 2024 · 0 comments
Open

Auto-encode query parameters #23

Hegi opened this issue Apr 24, 2024 · 0 comments

Comments

@Hegi
Copy link

Hegi commented Apr 24, 2024

When using the postmen collection, one of the biggest hurdles is that each Query Parameter has to be encoded manually. Now if you only occasionally using the collection it may not seem like a big deal, but having to constantly right click then encode the values can be quite tiresom.

If the collection would contain the bellow snippet, then this encoding would:

  • happen automagically
  • can be turned off, if desired.

And it can be defined on the Project folder, and inherently every request could leverage it.

if (pm.globals.get("PM_DISABLE_AUTO_ENCODE")!=="true") {   
    pm.request.url.query.each((param) => {
        param.value = encodeURIComponent(param.value);
    });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant