I am trying to use the btoa function in vCO 8.1 to encode a string. I see the btoa function listed as available in the editor, but I'm not actually sure how to use it.
I would assume I could use it like btoa('your_string_here') and it would then return a base64 value? I get an error saying btoa is not defined. I'm sure I just the syntax wrong. Anyone familiar with this?
let b64Encoded = Buffer.from('1234').toString('base64');
You can make the decoding similarly.
Thanks for the replies!
The root of my question really came from the btoa function that populates in the Orchestrator intellisense. It appears to be available, but maybe not usable. See image below:
In addition to suggestions in previous posts, you also have the following options:
Now that most API calls are REST based btoa and atob (or similar) should be provided without "going through hoops". Having each customer fix this on their side is not providing value. Customers should focus on differation and not implemeting base64 encoding.
Just my two cents.