I have built a REST API that returns an image and I am successfully getting its response through PostMan agent.
In my React Code, I have this:
return fetch(url, sInit)
.then((response) => {
let blb = new Blob([response.body], { type: 'image/jpeg' });
let fileUrl = (window.URL || window.webkitURL).createObjectURL(blb);
window.open(fileUrl);
})
The blob url generated does not have the image. What am I missing?