Postman - How to get the parameters and values ​passed in the url (Query Params) for validation?

I need to get the parameters and values ​​passed in the url (Query Params) to validate these values.

The parameter and value are passed like this in the url:

/Data?value=4

Upvotes: 1

Views: 2060

Answers (1)

PDHide
PDHide

Reputation: 19929

console.log(pm.request.toJSON().url.query)

you can as query parameter like this in the test script

Upvotes: 2

Related Questions