console snapshotI am calling one fetch API which giving the response header 'key-name':'value'. I checked in the chrome developer tools network tab. It showing the value. However, I am trying to read it during API response it's showing empty. I tried multiple ways but still not working. Below is my code.
const requestOptions = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
pid: d,
cy: v
}
)
};
fetch('https://mysite/api/manage/', requestOptions)
.then(res => res.json())
.then(jsong => {
console.log(jsong);
console.log(jsong.headers);
}).catch((err) => {
console.log(err);
});
Please help. I added a console snapshot and network response snapshot as well. network response snapshot
resresponse object.