Static GitHub Issues

[3195] Server Side rendering in Nuxt Axios module proxy URL

prev: Can i check nuxt:build progress detail message on terminal window?
next: this.addLayout of module not possible to set error layout
<!-- IMPORTANT: Please use the following link to create a new issue: https://nuxtjs.cmty.io/issues/new If your issue was not created using the app above, it will be closed immediately. -->

As I'm trying to use Nuxt and Nuxt/Axios module first time can any one help!!!

I'm using Axios module officially provided by Nuxt.js here, https://github.com/nuxt-community/axios-module.

How can I call action "SET_NEW_DEAL" from component in fetch method?

async fetch ({ store }) { await store.dispatch('SET_NEW_DEAL',store.getters.newDeal.page); } Is this correct?

Mine Acions file api request as below:

export default { async SET_NEW_DEAL ({commit}, payload) {

  return this.$axios.$get(`/api/?page=${payload}`)
  .then((response) => {
    if (response.status == 200) {
      commit('SET_NEW_DEAL',response.data);
    }
  }).catch((error) => {
    console.log(error)
  })

}

} Not able to hit api request, thus not able to commit mutation and so on.

I'm using proxy url configuration in nuxt.config.js also.

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c6851">#c6851</a>)</em></sub></div>