Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

pr-support-postman-variables-query #113

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

thim81
Copy link
Contributor

@thim81 thim81 commented Jun 19, 2021

Fix for unwanted encoding of Postman variables in query string, but keep support for "space".

In #93, we introduced URI.encodeReserved(feature.address.query()) to leverage encoding of query string to handle spaces/+ properly.

The [URI.encodeReserved()](http://medialize.github.io/URI.js/docs.html#static-encodeReserved) handles the special properties, but also encode the {{}} syntax for Postman variables, which is not desired.

In this PR, I made the proposal to remove URI.encodeReserved() but still keep the support of "space" encoding.

In attachment you can find the correct result for a postman collection with 2 query string with {{}}, + and space.

@thim81
Copy link
Contributor Author

thim81 commented Jun 19, 2021

@thim81
Copy link
Contributor Author

thim81 commented Jul 18, 2021

Linked to #106 and #104

thim81 referenced this pull request in apideck-libraries/postman-to-k6 Aug 17, 2021
* Extend support for Postman random functions/dynamic variables (#92)

* Fix for unwanted encoding of Postman variables in query string, but keep support for "space" (#113)

* Exclude disabled headers when converting requests (#103)

* Implement postman replaceIn function

* Extended test for url encode handling

* Extended test for url encoding of space characters

* Extended test to exclude disabled headers when converting requests (#103)

* Extended test to include checks for randomPhoneNumber & isoTimestamp

* Updated GH workflow actions

Co-authored-by: Tim <>
@thim81 thim81 closed this Aug 22, 2021
@thim81 thim81 reopened this Aug 22, 2021
@thim81
Copy link
Contributor Author

thim81 commented Sep 1, 2021

For those that run into the issue of the encoding, I have provided a forked NPM package version that contains a fix for the issue:

Replace in your packages.json:

"dependencies": {
    "postman-to-k6": "^1.5.0"
  }

to

"dependencies": {
    "@apideck/postman-to-k6": "^1.7.0"
  }

This is a forked NPM package, to facilitate other users. The current maintainers are quite overloaded by the acquisition of K6 by Grafana. By forking the repo & package, users can keep using new PR's & (security) fixes. At a later stage the changes can potentially be merged back in the original postman-to-k6 repo.

The changelog contains the differences between the original package & the forked version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant