flâneur — a map of the web's best reading

Hooks / handleFetch • Svelte Tutorial

learn.svelte.dev · 617 words · saved by 1 readers

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