title: How to do Basic Authentication from React Axios GET call to a SpringBoot microservice
body: <p><a href="https://i.stack.imgur.com/sCPi5.jpg" rel="nofollow noreferrer">Postman Request Details</a>
  <a href="https://i.stack.imgur.com/sCPi5.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sCPi5.jpg" alt="enter image description here"></a>
  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</p>
  
  <p>I have tried all the possibilities available on internet but in vain.</p>
  
  <p>Please help me get a solution to this.</p>
  
  <p>React Call: passing auth as parameter as it is the way to do Basic Authentication in Axios</p>
  
  <pre><code>    axios.get('http://localhost:8080/hellouser/greet/',
       {},
      {auth:{
          username:'demouser',
          password:'demopassword'
          }}).then(function (response) {
  console.log(response);
    })
  </code></pre>