Skip to content

Auto-encode query parameters #23

@Hegi

Description

@Hegi

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);
    });
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions