Created
August 28, 2022 04:05
-
-
Save theArjun/f14ad4ed5707d6c890169e2736bd5425 to your computer and use it in GitHub Desktop.
Set token to environment variable from response
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
| pm.test("Set token environment variable", function () { | |
| var response = pm.response.json(); | |
| var token = response['data']['token']; | |
| postman.setEnvironmentVariable('token', token); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment