Last active
September 13, 2023 14:41
-
-
Save raymelon/bea9b1fb6d75c0f69c28e2edc9f59999 to your computer and use it in GitHub Desktop.
postman save response to an enviroment variable
This file contains hidden or 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
| // on Tests tab, enter these | |
| var jsonData = pm.response.json(); | |
| if (jsonData["response_field_key"]) | |
| pm.environment.set("ENV_VARIABLE_KEY", jsonData.access_token); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment