Optional
init: RequestInit & {Optional
event?: {Primarily for SvelteKit's load function
Optional
responseType?: "text" | "json"Optional
responseType?: "json"Optional
event?: {Primarily for SvelteKit's load function
Optional
responseType?: "text" | "json"
Effective fetch
Sends the request and returns the response as parsed JSON (or text).
Template: T
The expected type of the JSON response
Returns
A promise that resolves to the parsed JSON or text data
Throws
If the fetch request fails or if the JSON parsing fails