-
Notifications
You must be signed in to change notification settings - Fork 137
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
How to handle optional query parameters in endpoint url #1303
Comments
Try using the env variable in query param value e.g then in the code let begin = tc.getVar("begin");
if(begin)
{
tc.setVar("beginQuery", begin);
} |
We can provide additional API if that helps Proposal - Updates or Add query param with value
tc.setParam("name", value); |
Hi @rangav, |
Sure will add to the roadmap. |
This feature is implemented and published to the marketplace, please update to See all features released Please let me know your feedback. |
Hi @rangav, I used this code in prescript:
Code was executed (as seen in console log) but the Request URL does not have the param 'status' included... |
Let me verify and get back to you. |
There was a bug, Fixed it now. Please update the extension to - v2.11.1 |
Your Team Size Using TC:
Expected team size is: 10-15
Question:
What would be the best way to handle optional query parameters in an endpoint url?
With postman it was very easy by scripting in a "Pre-request Script":
if (pm.variables.get('begin')) pm.request.url.query.add({key: 'from', value: pm.variables.get('begin')});
The text was updated successfully, but these errors were encountered: