Created
December 11, 2021 14:12
-
-
Save abdessamadely/48ca35960cfd46a1db33f9a8ca8b8886 to your computer and use it in GitHub Desktop.
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
const getCookieValue = (name) => ( | |
pm.response.headers.get('Set-Cookie').match('(^|;)\\s*' + name + '\\s*=\\s*([^;]+)')?.pop() || '' | |
) | |
const jwtToken = getCookieValue('jwt-token') | |
pm.environment.set("jwtToken", jwtToken) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment