Last active
September 30, 2019 16:17
-
-
Save vladanyes/dc6ee4b48e2b2be4225c2a08d1626666 to your computer and use it in GitHub Desktop.
Postman autosaving token in "authToken" environment variable. Add this code to the "Tests" tab.
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
if (pm.response.code === 201) { | |
pm.environment.set('authToken', pm.response.json().token); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment