Data type
Secret
Stores secret non-printable content.
The Secret data type stores the secret content returned by
HttpService:GetSecret(). It cannot be printed or logged, but can be
modified using built-in functions:
Methods 2#
AddPrefix(prefix: string): Secret#
Returns a secret formed by concatenating the supplied string to the secret
content, for example prepending "Bearer" to the API key.
| Name | Type | Default | Description |
|---|---|---|---|
prefix | string | The string to prepend to the secret content. |
Returns
Secret— A new Secret with the prefix prepended to the original secret value.
AddSuffix(suffix: string): Secret#
Returns a secret formed by concatenating the original secret and the supplied string parameter. Useful when creating a URL containing a key and query parameters.
| Name | Type | Default | Description |
|---|---|---|---|
suffix | string | The string to append to the secret content. |
Returns
Secret— A new Secret with the suffix appended to the original secret value.