Having an env var point to an attribute of either of multiple responses #3592
Unanswered
AmirShitrit
asked this question in
Ideas
Replies: 2 comments
|
Because Insomnia uses Nunjucks templates, you can do conditionals as part of a template. Note, the tag for the This somewhat works though. If If |
0 replies
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
My problem is that I'm trying to test a paging endpoint where paging is done using a continuation token (as opposed to using skip and limit params). In this scenario, requesting the first page not only returns the results, but also a token pointing to the next page. The second page will be requested using the token retrieved from the previous response.
Today, if I want to iterate through N pages, I'll have to create N distinct requests, each retrieving the token from its predecessor.
The solution I'm suggesting, is to have an env var point to response X's attribute and to fallback to response Y's attribute if X hasn't ran yet (being the second/third/... page and Y being the first page).
An alternative would be to enable running custom scripts.
All reactions