Skip to content

catch-all method for +server.js #9164

@karimfromjordan

Description

@karimfromjordan

Describe the problem

Astro's way of creating endpoints is almost identical to how it works in Svelte Kit (apart from the fact they use lowercase function names). But they also allow you to:

export an all function to match any method that doesn’t have a corresponding exported function.

See the Astro docs

I'm honestly not sure how niche this feature is but I found it to be very handy for building completely custom routing and APIs within the same SvelteKit Astro project without having to export multiple request handlers or running a separate Node server.

Describe the proposed solution

Add an ALL (or all?) request handler that does the same thing.

Alternatives considered

No response

Importance

nice to have

Additional Information

No response

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