How to Use Static Authentication Token In Vuejs
1) if you stroed Token in Localstore then get token from Localstoreage and use in your application.
Authorization: `Bearer ${localStorage.getItem('token')}`,
'Content-Type': 'application/json' }
2) You can added static token instated of your_token place.
axios.defaults.headers = {
Authorization: `Bearer + 'your_token'`,
'Content-Type': 'application/json' }
Note: you need to add above links before calling of Axios funtion.
Comments
Post a Comment