Skip to main content

setBasicAuthentication()

Last updated 1/10/2024

The

setBasicAuthentication()
is a function used on the
HTTPClient
object that automatically creates the Authorization Basic header instead of manually creating the authorization header yourself.

Available

Server

Function Signature
setBasicAuthentication(user: string, password: string) : FiveError;

ParameterTypeDescription
user
stringUser name required for the request
password
stringPassword required for the request

Return Value

Returns

null
on success, or a
FiveError
in the event of a failure.

Examples

setBasicAuthentication()