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
7 Replies
Silabear
SilabearOP2y ago
I think it's trying to do a thing with workers which isn't necessarily what we want here
Walshy
Walshy2y ago
Remove the credentials property
Silabear
SilabearOP2y ago
then the cookie from the api isnt sent
Walshy
Walshy2y ago
Yes it is If you send it, it'll be sent
Silabear
SilabearOP2y ago
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
Walshy
Walshy2y ago
^
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server