Skip to main content

http.base64decode(dataToDecode)

Decodes a Base64-encoded string or blob

Availability

Agent

Parameters

Name Type Description
dataToDecode String or blob Base64-encoded data

Returns

Blob — the decoded bytes, or a zero-length blob if the data is not valid Base64

Description

This method decodes Base64-encoded data, as defined in the RFC4648 specification, back to its original form.

If the data is not valid Base64, an empty blob is returned.

The corresponding encoding operation is http.base64encode().

Example Code