Skip to content

v3: fetch() / serverFetch() missing generics #4131

@MickL

Description

@MickL

Describe the feature

The functions fetch() and serverFetch() that nitro provides are missing generic(s) to set Response. Personally I would like to see the same DX as ofetch provides, comparison:

Image

Also I realized that Nitro's fetch doesnt throw an error like ofetch does when the resposne status is not 200.

Additional information

Possibly, shouldnt Nitro provide a patched ofetch with everything starting with / being an internal server fetch?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions