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
Silabear2y 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
Silabear2y ago
then the cookie from the api isnt sent
Walshy
Walshy2y ago
Yes it is If you send it, it'll be sent
Silabear
Silabear2y 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 User16mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server