Trying to fetch() with Svelte, not working with credentials
Hi,
This code doesn't work. It throws an error:
The credentials field on RequestInitializerDict is not implemented;
.
Is there a workaround? Otherwise it can't get the authenticated API data :P![](https://utfs.io/f/4ebc8262-fd49-4a43-8a61-27fd60026a02-1nq2cb.png)
7 Replies
I think it's trying to do a thing with workers which isn't necessarily what we want here
Remove the
credentials
propertythen the cookie from the api isnt sent
Yes it is
If you send it, it'll be sent
i think this is a dumb question but
how
becuase usually in normal js when we use credentials: 'include', it sends the cookies associated with the api as well
^
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View