i want to access a header in react js code. I am exposing an API from backend and along with i am sending token to browser in header.
I am consuming this API from ReactJs axios. So how can i access this header in Reactjs
axios.post(ConstClass.BASE_URL + '/login', this.state).then((response) => {
console.log(response.headers);
}).catch((error) => {
this.setState({
errorMessage : 'Invalid username and password.'
});
});