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.

Do not write user names and passwords in scripts. The RestClient.Authenticate method resolves credentials from the domain settings and is more secure.

See Also