![]() ![]() Loop through values from GET to next PUT request - Help - Postman. Here’s a couple of examples of using array.shift() in different ways. You can create one or more requests and group them in Collection, and as name suggests, you can run the entire collection i.e. In the Tests tab, you retrieve the updated request and keep looping using setNextRequest while the array length is less than zero. ![]() Your put request needs to be inside that loop for this to work. Currently, your loop will just run through and the fs variable will always be 10 when the next request is run. michaelderekjones (Mike Jones) December 9, 2022, 10:24am 2. sanjit.dikshit (Sanjit Dikshit) January 25, 2020, 8:08am 11. var fs pm.environment.get (fs) Testing multiple cases for a request. Then stack the windows so the Send buttons can be clicked fast. If this is correct then the below code should give you what you need Note: Request 1 has to loop through all the rows so the iteration count has to be set to the number of rows. Those who are involved in API or web service development should be knowing about Postman, it is one of the most popular tools to build API requests and test them.Ĭollection Runner is one of the feature of Postman. Open your requests in new Postman windows, not tabs. So if my understanding is correct, you are trying to loop through a CSV to build a payload, that can then be sent as a request body for a subsequent call.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |