Skip to content

Instantly share code, notes, and snippets.

@samhk222
Last active March 30, 2022 20:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samhk222/1e8f5c07a13198bc5339333d50f5c842 to your computer and use it in GitHub Desktop.
Save samhk222/1e8f5c07a13198bc5339333d50f5c842 to your computer and use it in GitHub Desktop.
Postman Request
const reqObject = {
url: 'https://myendpoint.com/cnpj',
method: 'GET',
header: 'token: MYTOKEN'
};
pm.sendRequest(reqObject, (err, res) => {
const returned_date = res.json()
pm.collectionVariables.set ("fetched_cnpj", returned_date.data.cnpj);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment