You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var action = pm.variables.replaceIn(pm.request.url.getPathWithQuery());
It allows me to use the output directly in a Hash calculation.
I don't find anything better in Bruno than let url = req .getUrl() .replace(/^.*{{baseUrl}}/gm, '') .replace('{{merchantId}}', merchantId);
Do you know how to simplify this ?
My url is like that {{baseUrl}}/v2/{{merchantId}}/hostedcheckouts but can vary a lot with other environment variable.
the result in postman is something like /v2/TestMerchant/hostedcheckouts
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
In Postman, I use this function in a Pre-Script
var action = pm.variables.replaceIn(pm.request.url.getPathWithQuery());
It allows me to use the output directly in a Hash calculation.
I don't find anything better in Bruno than
let url = req .getUrl() .replace(/^.*{{baseUrl}}/gm, '') .replace('{{merchantId}}', merchantId);
Do you know how to simplify this ?
My url is like that
{{baseUrl}}/v2/{{merchantId}}/hostedcheckouts
but can vary a lot with other environment variable.the result in postman is something like
/v2/TestMerchant/hostedcheckouts
thank you for your help
Beta Was this translation helpful? Give feedback.
All reactions