Description
I use nuxt/http throughout my project in different ways, but mainly within the fetch
method. It works great.
One thing I've started doing in my application recently is creating JS files for my forms. Signup.form.js
and Login.form.js
and all of these forms extend a Base.form.js
.
I would like to import nuxt/http into these files if at all possible? Seems like it is not meant for use outside of the Nuxt architecture which is completely understandable. I know I can just use another module such as got
or axios
to do what I need to do, but then I have to hold a whole other set of configurations to be able to contact my backend API.
If there is no way for me to import nuxt/http to use in any JS file, would I be able to accomplish it by creating a Nuxt plugin? I figure this.http
can be accessed within a Nuxt plugin?
Activity