Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A PR in SvelteKit introduces a number of breaking changes that
lay the foundation for streaming request/response bodies
enable multipart form handling (including file uploads)
better align SvelteKit with modern platforms that deal with
Request
andResponse
objects nativelyHooks (
handle
,handleError
andgetSession
) and endpoints previously received a proprietaryRequest
object:Instead, they now receive a
RequestEvent
:method
andheaders
are no longer necessary as they exist on therequest
object. (url
is still provided, since theURL
object contains conveniences likeurl.searchParams.get('foo')
, whereasrequest.url
is a string.)To access the request body use the text/json/arrayBuffer/formData methods, e.g.
body = await request.json()
.See sveltejs/kit#3384 for details