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
// generating random data | |
var randomData = Math.random(); | |
// getting Auth tokens from other Auth services | |
pm.sendRequest({ | |
url:"https://postman-echo.com/basic-auth", | |
method: "GET", | |
header: { | |
'Authorization': 'Basic ' + btoa('postman:password') | |
} |
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
let headers = {'X-Api-Key' : ''}; | |
headers[`X-Api-Key`] = String(pm.variables.get("postman_api_key")); | |
// Note: Update the environment UID if no longer sync | |
const postman_api_url = "https://api.getpostman.com/environments/" + pm.environment.get("uid"); | |
let requestOptions = { | |
url: postman_api_url, | |
method: 'GET', | |
header: headers |