To configure the driver to use basic authentication:
Configure the minimum properties required for a connection:
If you are using a REST file, set the Config property to provide the name and location of the input REST file. For example, C:/path/to/myrest.rest.
If you are using the Sample property, set the Sample property to specify the endpoint that the want to connect to and sample. For example, https://example.com/countries/.
Set the AuthenticationMethod property to Basic.
Set the AuthHeader property to specify the name of the HTTP header used for authentication. The default is Authorization.
Set the User property to specify your logon ID.
Set the Password property to specify your password.
Optionally, specify values for any additional properties you want to configure.
The following examples demonstrate a session using a REST file with basic authentication enabled and AuthHeader set to the default.