Skip to content

Instantly share code, notes, and snippets.

@rafaelmaeuer
Created August 24, 2022 18:38
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 rafaelmaeuer/003f7a7b02622cb6e6c7808cc0bb5f6c to your computer and use it in GitHub Desktop.
Save rafaelmaeuer/003f7a7b02622cb6e6c7808cc0bb5f6c to your computer and use it in GitHub Desktop.
const message = pm.variables.replaceIn('{{$randomCatchPhrase}}')
var sha256Hash = CryptoJS.SHA256(message).toString();
//Method used to add Query params via script
pm.request.addQueryParams("sha256Hash=" + sha256Hash + "&infoData=" + pm.collectionVariables.get("infoData"));
console.log("sha256Hash :: " + sha256Hash)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment