components/index.vue
<template>
<div>
<p>{{ $store.state.token }}</p>
<v-btn class @click="reqs">click to request</v-btn>
</div>
</template>
<script>
export default {
methods: {
async reqs (ctx) {
let me = await this.$axios.get('/cek')
console.log(me.data)
}
}
}
</script>
so, i click "Click to request" and get this response from server
I have tried with postman, and the result is normally, but, why if i use nuxt axios modules the request always changed to OPTIONS (instead GET, POST, PUT)... what should i do ?
NOTE:
@nuxtjs/axios
modulesI use setToken in requestInterceptors placed nuxt.config.js