This question has been asked but none of the answers helped.
In react native I'm making an api call with this:
getAuthToken = () => {
SecureStore.getItemAsync('authToken')
.then((authToken) => {
console.log(authToken);
fetch('https://example.com?token=' + authToken + '&order_id=5480', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
}
}
)
})
.then(res => res.json())
.then(result => {
console.log(result)
})
.catch(error => {
console.error(error);
})
}
In post man I can confirm this works:

However console.log(result) keeps returning as undefined. Any ideas what I'm doing wrong?