In my case i want to update the URL path variable, for this i have tried multiple ways but all works until i run the flow manually from postman but as soon as i use webhook it doesn’t work.
Things tried
- {{URL}}/{{localVariable}}/abc
pm.environment.set("localVariable", isValid);
This works fine for manual run but not with webhook
- {{URL}}/:is_valid/abc
const url = pm.request.url.toString();
const updatedUrl = url.replace('is_valid', isValid.toString());
pm.request.url.update(updatedUrl);
- Even updating headers from pre script is not working with webhooks.
pm.request.headers.add({ key: 'IsValid', value: isValid });
This works fine for manual run but not with webhook