encodeBase64Url
Encodes Base64URL content. This is a version of Base64 that is safe for URLs without needing any additional encoding. See base64.guru for more details.
Signatures
beacon.encodeBase64Url(binary);
Parameters
binary
The raw binary content to encode.
Return Values
Type | Notes |
---|---|
String | The encoded ASCII-safe data. |
Examples
Encode a hello world message
const encoded = beacon.encodeBase64Url('Hello World');
beacon.debugPrint(encoded); // Outputs "SGVsbG8gV29ybGQ"