I have an api with the following documentation. I am currently using axios. I am getting an Unauthorized error
const res=axios.get("http://aaaaaaaaa.com", {
Authorization: {
'Username' : '09822222222',
'Password' : 'sana1234'
},
headers:{
'Content-Type': 'application/json'
}
});
Header “Content-Type”: “application/json” The login credentials should be passed as basic-auth through Authorization header Username: “test” Password: “test”