withBasicCredentials method
Sets HTTP Basic authentication credentials.
The credentials are base64-encoded as username:password and added
as an Authorization: Basic <encoded> header.
Returns this for chaining.
Implementation
HttpWaitStrategy withBasicCredentials(String username, String password) {
final encoded = base64.encode(utf8.encode('$username:$password'));
_headers['Authorization'] = 'Basic $encoded';
return this;
}