Public
Documentation Settings

Time loop

This Collection defines a starting time stamp, then loops through a request posting 1 minute increases to the starting time for 70 iterations.

POSTPOST Time

https://postman-echo.com/post

How this request works:

Pre-request script

  • Sets a starting timestamp (now, minus 10 minutes)
  • Initialize a loop counter
  • Sets the timestamp of the current loop based on loop counter, and sets a variable used in the request body
  • Increments the counter

Test script

  • Check the loop counter, and loop the current request if counter < 71 (70 iterations)
HEADERS
Content-Type

application/json

Bodyraw
{
    "timestamp": "{{time}}"
}
Example Request
curl
curl --location 'https://postman-echo.com/post' \
--header 'Content-Type: application/json' \
--data '{
    "timestamp": "{{time}}"
}'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers