diff options
| author | Pitu <[email protected]> | 2019-03-29 00:35:22 +0900 |
|---|---|---|
| committer | Pitu <[email protected]> | 2019-03-29 00:35:22 +0900 |
| commit | 8905f2e7a7096e8567e1d1871af62f0842303dfc (patch) | |
| tree | f0b1028ab479716b2dbe26b538935b58d5f7f82c /src/site/plugins/axios.js | |
| parent | Turns out we were using the wrong cookieparser (diff) | |
| download | host.fuwn.me-8905f2e7a7096e8567e1d1871af62f0842303dfc.tar.xz host.fuwn.me-8905f2e7a7096e8567e1d1871af62f0842303dfc.zip | |
Added axios package
Diffstat (limited to 'src/site/plugins/axios.js')
| -rw-r--r-- | src/site/plugins/axios.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/site/plugins/axios.js b/src/site/plugins/axios.js new file mode 100644 index 0000000..5a169b2 --- /dev/null +++ b/src/site/plugins/axios.js @@ -0,0 +1,29 @@ +/* +import Vue from 'vue'; +import axios from 'axios'; +import VueAxios from 'vue-axios'; + +Vue.use(VueAxios, axios); +Vue.axios.defaults.headers.common.Accept = 'application/vnd.lolisafe.json'; +*/ + +export default function({ $axios, redirect }) { + $axios.onRequest(config => { + console.log(`Making request to > /${config.url}`); + }); + $axios.setHeader('accept', 'application/vnd.lolisafe.json'); + + $axios.onError(error => { + // console.log('====='); + console.log(error); + // console.log('====='); + /* + $toast.open({ + duration: 2500, + message: 'testing', + position: 'is-bottom', + type: error ? 'is-danger' : 'is-success' + }); + */ + }); +} |