Axios-module: How to use @nuxtjs/axios in actions in store

Created on 14 May 2019  路  3Comments  路  Source: nuxt-community/axios-module

import axios from '@nuxtjs/axios'

export const actions ={
   getProductList(){
         axios.get('http://xxxxx')
}
}

axios is not default ?

This question is available on Nuxt community (#c245)
question

All 3 comments

This issue as been imported as question since it does not respect axios-module issue template. Only bug reports and feature requests stays open to reduce maintainers workload.
If your issue is not a question, please mention the repo admin or moderator to change its type and it will be re-opened automatically.
Your question is available at https://cmty.app/nuxt/axios-module/issues/c245.

why closed?

Hi. You don't need to import it. But should use this.$axios.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

seanwash picture seanwash  路  6Comments

lyzs90 picture lyzs90  路  4Comments

ealves-pt picture ealves-pt  路  3Comments

simllll picture simllll  路  6Comments

chrislentz picture chrislentz  路  3Comments