SyntaxFix
Write A Post
Hire A Developer
Questions
You are missing a space between Basic and the encoded username and password.
Basic
headers.set('Authorization', 'Basic ' + base64.encode(username + ":" + password));