Created
February 22, 2021 20:32
-
-
Save hoto/e9cc4be58921ecfa8add6450362ac8b2 to your computer and use it in GitHub Desktop.
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
const getAccessTokenRequest = { | |
url: 'http://localhost:5050', | |
method: 'GET', | |
}; | |
pm.sendRequest(getAccessTokenRequest, (err, res) => { | |
console.log(err ? err : res.json()); | |
if (err === null) { | |
console.log("Saving the access token"); | |
var responseJson = res.json(); | |
pm.environment.set("currentAccessToken", responseJson.access_token); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment