multiple responses can override variables #4594
Unanswered
akaswenwilk
asked this question in
Ideas
Replies: 1 comment
-
+1 |
Beta Was this translation helpful? Give feedback.
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey, firstly just wanna say thanks to all the contributors on this project. Very nicely put together application! I'm exploring insomnia with my team and considering making the switch from postman, but there's one feature that as far as I can tell isn't achievable with the current set up (though I might simply have missed something, would be great if someone could point me in the proper direction if this is the case 😄 ). I would like to be able to have different requests set the same environment variable (basically each different request would override the previous value of the env variable). My use case has to do with polymorphism in REST APIs:
Suppose you have an API to create dogs and cats and then you could query for animals:
when creating a dog or a cat, and you can use the id from either of them to query a specific animal.
With current setup in insomnia, I could set the id in the dogs response to be dog_id and then I could set the id in the cat response to be cat_id, and then I would have to duplicate the GET animals request:
It would be great if the response from both cats and dogs could just set one animal_id environment variable, and then I could use the same endpoint to query whichever I just created
Is this currently possible and I've just missed something? If not, would this be doable? Thanks for the responses!
Beta Was this translation helpful? Give feedback.
All reactions