axios interceptor authorization header code example
Example 1: axios default headers authorization
axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
Example 2: axios defaults headers common
// GET request for remote image
axios({
method: 'get',
url: 'http://bit.ly/2mTM3nY',
responseType: 'stream'
})
.then(function(response) {
response.data.pipe(fs.createWriteStream('ada_lovelace.jpg'))
});