Created
July 28, 2020 07:50
-
-
Save tng-sy/b2992aa44b6836a9a2d4aae53046337f to your computer and use it in GitHub Desktop.
Postman add token on request reponse
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
try { | |
const data = pm.response.json(); | |
const token = data.token; | |
pm.environment.set('token', token); | |
} catch (onError) { | |
// Nop. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment