Answers for "How to globally use Axios instance and interceptors in Vue.js"

1

How to globally use Axios instance and interceptors in Vue.js

import axios from ‘axios’export default axios.create({ baseURL: `your API end point`, headers: { ‘Accept’: ‘application/json’, ‘Content-Type’: ‘application/json’ } })
Posted by: Guest on July-26-2021
1

How to globally use Axios instance and interceptors in Vue.js

Vue.prototype.$http = api;
Posted by: Guest on July-26-2021

Browse Popular Code Answers by Language