diff --git a/test/fixture/pages/asyncData.vue b/test/fixture/pages/asyncData.vue index b45b366..2e2985b 100644 --- a/test/fixture/pages/asyncData.vue +++ b/test/fixture/pages/asyncData.vue @@ -7,7 +7,7 @@ diff --git a/test/fixture/pages/ssr.vue b/test/fixture/pages/ssr.vue index 3c44703..11509cb 100644 --- a/test/fixture/pages/ssr.vue +++ b/test/fixture/pages/ssr.vue @@ -13,16 +13,16 @@ async fetch({app, route}) { let doLogin = route.query.login !== undefined if (doLogin) { - app.$axios.setHeader('sessionId', reqCtr++) + app.$http.setHeader('sessionId', reqCtr++) } }, computed: { axiosSessionId() { - return this.$axios.defaults.headers.common.sessionId + return this.$http.defaults.headers.common.sessionId }, axiosEncoding() { - return this.$axios.defaults.headers.common['Accept-Encoding'] + return this.$http.defaults.headers.common['Accept-Encoding'] } } } diff --git a/test/fixture/plugins/axios.js b/test/fixture/plugins/axios.js index a0d2c5b..b498340 100644 --- a/test/fixture/plugins/axios.js +++ b/test/fixture/plugins/axios.js @@ -1,8 +1,8 @@ -export default function ({ $axios, redirect }) { - $axios.onRequest((config) => { +export default function ({ $http, redirect }) { + $http.onRequest((config) => { // eslint-disable-next-line no-console console.log('SPY: ' + config.url) - $axios.defaults.xsrfHeaderName = 'X-CSRF-TOKEN' + $http.defaults.xsrfHeaderName = 'X-CSRF-TOKEN' }) } diff --git a/test/fixture/store/index.js b/test/fixture/store/index.js index b1dc272..e3a41de 100644 --- a/test/fixture/store/index.js +++ b/test/fixture/store/index.js @@ -1,12 +1,12 @@ export default { actions: { nuxtServerInit({ commit }, ctx) { - if (!ctx.$axios) { - throw new Error('$axios is not defined!') + if (!ctx.$http) { + throw new Error('$http is not defined!') } - if (!ctx.app.$axios) { - throw new Error('$axios is not defined!') + if (!ctx.app.$http) { + throw new Error('$http is not defined!') } } }