Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to import this module in my application? #193

Open
justindasilva opened this issue Oct 14, 2021 · 0 comments
Open

Ability to import this module in my application? #193

justindasilva opened this issue Oct 14, 2021 · 0 comments

Comments

@justindasilva
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant