axios-info
Grab info from Axios request and response
Usage
const axios = require('axios');
const axiosInfo = require('axios-info');
axios.get('/user?ID=12345')
.then(function (response) {
console.log(axiosInfo.status(response));
console.log(axiosInfo.statusText(response));
console.log(axiosInfo.config(response));
console.log(axiosInfo.method(response));
console.log(axiosInfo.url(response));
console.log(axiosInfo.urlFull(response));
})
.catch(function (error) {
console.log(axiosInfo.status(error));
console.log(axiosInfo.statusText(error));
console.log(axiosInfo.config(error));
console.log(axiosInfo.method(error));
console.log(axiosInfo.url(error));
console.log(axiosInfo.urlFull(error));
});