Hooks / handleFetch • Svelte Tutorial
For example, we could respond to requests for src/routes/a/+server.js with responses from src/routes/b/+server.js instead: Later, when we cover universal load functions, we'll see that event.fetch can also be called from the browser. In that scenario, handleFetch is useful if you have requests to a public URL like https://api.yourapp.com from the browser, that should be redirected to an internal URL (bypassing whatever proxies and load balancers sit between the API server and the public internet) when running on the server. Next: handleError
Hooks / handleFetch • Svelte Tutorial Skip to main content Tutorial Packages Playground Blog Basic Svelte Introduction Welcome to Svelte Your first component Dynamic attributes Styling Nested components HTML tags Reactivity State Deep state Derived state Inspecting state Effects Universal reactivity Props Declaring props Default values Spread props Logic If blocks Else blocks Else-if blocks Each blocks Keyed each blocks Await blocks Events DOM events Inline handlers Capturing Component events Spreading events Bindings Text inputs Numeric inputs Checkbox inputs Select bindings Group inputs Sele
Explore this link on the map →related reading
- Web standards • SvelteKit Docskit.svelte.dev
- State management • SvelteKit Docskit.svelte.dev
- Svelte tutorial note | sung.codessung.codes
- Getting Started: Error Handling | Next.jsnextjs.org
- Getting Started: Fetching Data | Next.jsnextjs.org
- How to fetch data in React [2024] - Robin Wieruchrobinwieruch.de
- Getting Started: Fetching Data | Next.jsnextjs.org
- Introduction / What is SvelteKit? • Svelte Tutoriallearn.svelte.dev
- File-system conventions: loading.js | Next.jsnextjs.org
- Configuration • SvelteKit Docssvelte.dev
- Cursor Docs — Agent, Rules, MCP, Skills & CLIdocs.cursor.com
- Errors and redirects / Basics • Svelte Tutoriallearn.svelte.dev