Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

global axios vue 2

import Axios from 'axios'

// set global axios like this
Vue.prototype.$axios = Axios;

// call axios like this
this.$axios.get('https://jsonplaceholder.typicode.com/todos/1')
 
PREVIOUS NEXT
Tagged: #global #axios #vue
ADD COMMENT
Topic
Name
3+4 =