I am using axios for a react application and I would like to log all axios calls that I\'m making anywhere in the app. I\'m already using a single global instance of axios via t
You can try wrap the axios.request function in a Promise.
axios.request
function loggedRequest(config) { return new Promise((resolve, reject) => { axios.request(config) .then((res) => { // log success, config, res here resolve(res); }) .catch(err => { // same, log whatever you want here reject(err); }) }) }