Skip to content

export Supafetch class? #2

@someone1

Description

@someone1

I'd like to be able to create instances of this class instead of relying on a single globally shared instance. Axios has similar functionality and it's useful in scenarios where I have multiple APIs I want to interact with and they have different authentication. I can set default headers and such per-instance instead of trying to have my API calls explicitly specify the headers per-call or wrap the supafetch object myself to add these. This is also helpful where I want to keep the default instance pure, for instance as a public client where I never want to leak a credential.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions