I\'ve read many answers of preflight and CORS so please do not post links referencing what I should read. Many of the answers are from a server-perspective, but I am the cli
If you want to set the authorization header
req.setRequestHeader('Authorization','Basic ' + Base64StringOfUserColonPassword);