Open
Description
In lesson 8, Greg creates a new Axios instance:
import axios from 'axios'
const apiClient = axios.create({
baseURL: `http://localhost:3000`,
withCredentials: false,
headers: {
Accept: 'application/json',
'Content-Type': 'application/json'
}
})
However, in lesson 6 we already installed and configured the Nuxt Axios module which "gives you a bunch of additional features out of the box":
nuxt.config.js
module.exports = {
modules: [
'@nuxtjs/axios',
]
}
Seeing as we are not using this module in the service, I presume we don't get these benefits, or any of the configuration benefits?
Could we use the original Nuxt instance / is there even a way to use this, so:
import client from `...`
Metadata
Metadata
Assignees
Labels
No labels