Replies: 1 comment
-
You could create a function to help pass the token into the fetch method options |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I cannot find any reference in the documentation if
hooks.client.ts
can haveHandle
andHandleFetch
handlers.when I added, they are not getting called. only
HandleClientError
hook works inhooks.client.ts
if that is the case, please clarify in the document. there are may devs using then on github
https://github.com/search?q=sveltejs+filename%3A%22hooks.client.ts%22&type=code
If those hooks are not supported in
hooks.client.ts
, what is recommended approach to addAuthorization: Bearer <token>
header for all outgoing fetch calls (to a specific domain) in+page.ts
or any other client-side fetch code ?Beta Was this translation helpful? Give feedback.
All reactions