Can someone help me to remove the hyphens and transform all characters to uppercase (from a postman $guid
)?
Haven't find anything useful.
Thanks
Can someone help me to remove the hyphens and transform all characters to uppercase (from a postman $guid
)?
Haven't find anything useful.
Thanks
There are many hacky ways to do this in Postman, here's one of them:
let guid = pm.variables.replaceIn('{{$guid}}')
let formattedGuid = guid.replace(/-/g, '').toUpperCase()
pm.globals.set("newGuid", formattedGuid)
If you add that to the Pre-request Script
, you'll be able to use it in the requests.
Pre-request Script
and Tests
sandbox environment allow you to use JS do well....whatever you want. It also has it's own pm.*
API with certain Postman specific functions. –
Instillation Or you can use the new postman guid generator {{newGuid}}
© 2022 - 2024 — McMap. All rights reserved.