Fetch API & Handling JSON Responses
What is the purpose of the credentials option?
fetch('/api/data', {
credentials: 'include',
headers: {
'Authorization': 'Bearer ' + token
}
})
fetch('/api/data', {
credentials: 'include',
headers: {
'Authorization': 'Bearer ' + token
}
})