Skip to content

Ability to import this module in my application? #193

Open
@justindasilva

Description

@justindasilva

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions