0👍
use this instead
config.headers = {
...config.headers,
'Authorization': `Bearer ${localStorage.getItem('token')}`,
'Content-Type': 'application/json',
'Accept': 'application/json'
}
Source:stackexchange.com
0👍
use this instead
config.headers = {
...config.headers,
'Authorization': `Bearer ${localStorage.getItem('token')}`,
'Content-Type': 'application/json',
'Accept': 'application/json'
}