-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add fetch
to RequestEvent
#7113
Conversation
🦋 Changeset detectedLatest commit: cc74f19 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Will the |
No. |
Co-authored-by: repsac <repsac-by@users.noreply.github.com>
I'm not sure where best to document this, but I do think we're probably overdue for a little bit of an explanation somewhere about how the different instances of |
Agree, it could be clearer. Do you think that blocks this PR, or are we good to merge it in the meantime? #7087 is blocked on this one (though there is some discussion in that issue about rethinking docs as well) |
@Rich-Harris Nope, I'm fine foregoing docs updates for now if we're going to be rethinking these docs in the context for #7087 anyway. |
Closes #6320. This moves SvelteKit's
fetch
wrapper toRequestEvent
so that it can be used by server-onlyload
functions and+server.js
handlers as well as sharedload
functions. (It can even be used inhandle
, or — somewhat pointlessly — insidehandleFetch
, as a consequence of where it now lives.)Marking as draft because we're no longer using (or able to use)
GENERIC_ERROR
, and I'm not quite sure what the consequences of that are just yet.Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. All changesets should bepatch
until SvelteKit 1.0