Reputation: 61
Good afternoon. Please help me in the below scenario,
I have two api: 1) ABC api 2) XYZ api
ABC api alters the output of XYZ api, I create a collection and add this two api in this collection, and I want the execution sequence like below:
How can I achieve this sequence using postman?
If the question is not clear please let me know, I will try to be more descriptive, Thank you
Upvotes: 0
Views: 1356
Reputation: 109
Under the "Pre-request Script" you can make a call to your abc API. And set it to a variable.
Like :
const response = await fetch(httpAdressAsString);
Or use the snippet of Postman:
pm.sendRequest("https://postman-echo.com/get", function (err, response) {
console.log(response.json());
});
Upvotes: 0