I am trying to adapt this curl request to run in Axios but I keep getting an error "Header Validation Failure". What is wrong with my authentication?
Original Curl:
curl -X POST www.website.com
-H "Content-Type: application/json"
-u 'XXX:YYY'
-d $'{
datastring
}'
Axios:
axios({
method: 'post',
url: 'www.website.com',
data: dataString,
headers: {
'Content-Type': 'application/json',
'Authorization': \`Basic 'XXX:YYY'`
}
}).then((response) => {
alert(response);
});