Skip to content

Instantly share code, notes, and snippets.

@ndunks
Created July 30, 2021 04:02
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 ndunks/8b36b9866cee2be695fc8733b2538362 to your computer and use it in GitHub Desktop.
Save ndunks/8b36b9866cee2be695fc8733b2538362 to your computer and use it in GitHub Desktop.
// IF using cookie, make sure the domain was added in "Cookie" -> Whitelist Domain
// Walk cookie
const cookie = pm.cookies.jar();
cookie.getAll(pm.request.url, (v1, cookies) => {
for (let v of cookies.map()) {
if (v.name.length > 32 && v.name.match(/[0-9a-f]/i)) {
pm.request.body.urlencoded.add({
key: v.name,
value: v.value
})
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment