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

fix(start): enable HEAD requests to API HEAD/GET routes #1661

Merged
merged 3 commits into from
Oct 31, 2024

Conversation

paularmstrong
Copy link
Contributor

Fixes #1657

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • infrastructure changes
  • Other... Please describe:

What is the current behavior?

HEAD requests to API endpoints fail, unable to define them manually

What is the new behavior?

  1. Allows export const HEAD: APIHandler = async () => { … }; as API endpoints
  2. Falls back on GET api methods if no HEAD function is defined.

Other information

Copy link

changeset-bot bot commented Oct 26, 2024

🦋 Changeset detected

Latest commit: 9f26122

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solidjs/start Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ryansolid ryansolid merged commit 545a8ce into solidjs:main Oct 31, 2024
3 checks passed
@paularmstrong paularmstrong deleted the enable-head-requests branch October 31, 2024 16:54
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

Successfully merging this pull request may close these issues.

[Bug?]: API requests missing HEAD request functionality
2 participants