A server-aware variant of the native fetch.
It resolves relative URLs against event.url, forwards cookie and
authorization headers by default, and dispatches same-origin requests
internally through the router when possible.
Optionalinit: RequestInitOptionalinit: RequestInitThe client's IP address, set by the adapter.
Contains custom data that was added to the request within the middlewares.
The parameters of the current route - e.g. for a route like /blog/[slug], a { slug: string } object.
Additional data made available through the adapter.
The original request object.
Info about the current route.
The ID of the current route - e.g. for src/routes/blog/[slug], it would be /blog/[slug]. It is null when no route is matched.
If you need to set headers for the response, you can do so using the method. This is useful if you want the page to be cached, for example:
Setting the same header multiple times (even in separate load functions) is an error — you can only set a given header once.
You cannot add a set-cookie header with setHeaders — use the cookies API instead.
The requested URL.
Get or set cookies related to the current request