Skip to content

feat: enable Url in pre-request scripting [INS-3379]#7123

Merged
jackkav merged 4 commits intodevelopfrom
pre-script-url
Feb 29, 2024
Merged

feat: enable Url in pre-request scripting [INS-3379]#7123
jackkav merged 4 commits intodevelopfrom
pre-script-url

Conversation

@ihexxa
Copy link
Contributor

@ihexxa ihexxa commented Feb 28, 2024

Changes:

  • enabled Url in pre-request scripting
  • added unit tests and smoke test

How to test:

Please run this script and check its output.

const { Url, QueryParam, Variable } = require('insomnia-collection');

const url = new Url({
		auth: {
				username: 'usernameValue',
				password: 'passwordValue',
		},
		hash: 'hashValue',
		host: ['hostValue', 'com'],
		path: ['pathLevel1', 'pathLevel2'],
		port: '777',
		protocol: 'https:',
		query: [
				new QueryParam({ key: 'key1', value: 'value1' }),
				new QueryParam({ key: 'key2', value: 'value2' }),
		],
		variables: [
				new Variable({ key: 'varKey', value: 'varValue' }),
		],
});

console.log(url.toString());

@ihexxa ihexxa self-assigned this Feb 28, 2024
filfreire
filfreire previously approved these changes Feb 29, 2024
@jackkav jackkav dismissed filfreire’s stale review February 29, 2024 13:36

The merge-base changed after approval.

@jackkav jackkav merged commit 86f6d01 into develop Feb 29, 2024
@jackkav jackkav deleted the pre-script-url branch February 29, 2024 13:37
jackkav added a commit to jackkav/insomnia that referenced this pull request Mar 13, 2024
* chore: enable Headers in pre-request scripting

* feat: add Variables and VariableList to the collection

* feat(hidden-window): enable url and UrlMatchPattern in pre-request scripting

---------

Co-authored-by: Jack Kavanagh <jackkav@gmail.com>
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

Successfully merging this pull request may close these issues.

3 participants