Skip to content

AuthenticateBasic

Authenticates the client using HTTP Basic authentication.

1
myRestClient.AuthenticateBasic(userName: string, password: string):RestClient

Parameters

string userName
    The user name to send. Cannot be null or empty.

string password
    The password to send.

Returns

The current RestClient instance.

Remarks

HTTP Basic authentication is considered a non-secure mechanism as the password is sent in a near clear-text format.
It is not recommended to specify the user name and password directly from the scripting environment. The RestClient.Authenticate method automatically resolves credentials from domain settings and is more secure.

See Also