Postman Request Details
I am using axios.get() to call a secured SpringBoot Microservice but it returns a 401 Unauthorized response.
Postman returns the output as expected for SpringBoot Microservice but not the React App
I have tried all the possibilities available on internet but in vain.
Please help me get a solution to this.
React Call: passing auth as parameter as it is the way to do Basic Authentication in Axios
axios.get('http://localhost:8080/hellouser/greet/',
{},
{auth:{
username:'demouser',
password:'demopassword'
}}).then(function (response) {
console.log(response);
})