When to use Fetch in RequestEvent #13477
-
I have go through many tutorials and it's not clear of when to use the For example, in the +page.server.js:
My question is in which file I can use the fetch from the
And when should I use it? One of the reason I could think of is when calling the local API such as |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
See the note in the fetch APIs documentation:
So it's available pretty much everywhere and when the code runs on the server, it does not even involve a network call. There is also some more documentation in the types section of the docs, see e.g. the |
Beta Was this translation helpful? Give feedback.
See the note in the fetch APIs documentation:
So it's available pretty much everywhere and when the code runs on the server, it does not even involve a network call.
There is also some more documentation in the types section of the docs, see e.g. t…