bulletproof-react
bulletproof-react copied to clipboard
Question: Is there any reason why global axios defaults shouldn't be used in api-client.ts?
trafficstars
As per title, I was curious if there's any reason why global axios defaults shouldn't be used in api-client.ts?
So instead of:
if (config.headers) {
config.headers.Accept = 'application/json';
}
you'd have:
axios.defaults.headers.common.Accept = 'application/json';