Encodes a string or blob in Base64 format
Agent
Name | Type | Description |
---|---|---|
dataToEncode | String or blob |
The data you wish to encode
|
String — the Base64-encoded data
This method encodes binary data or a string of characters into a Base64 string, as defined in the RFC4648 specification. This is often useful when you are working with web services, such as those which exchange data in JSON format, as these are not usually equipped to handle raw binary data.
The corresponding decoding operation is http.base64decode().