Created
June 10, 2022 21:05
-
-
Save techygrrrl/20a4ff990d9f6a035b1e35c85b3d1652 to your computer and use it in GitHub Desktop.
Postman script to support pagination
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Assumes you have a value on the response JSON `pagination.cursor` and an environment variable `next_cursor` | |
// Will set this environment variable so you can use it for subsequent requests. | |
const responseJson = pm.response.json(); | |
pm.environment.set("next_cursor", responseJson.pagination.cursor); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment