Using this code in chrome with a url targeting a .jpg file always returns “text/plain”, but when i do the same in Postman the content-type is image/jpeg, which is what i expect. Why does fetch give me a different content-type? I need a front-end js solution which allows me to obtain the “true” content-type in the response. How can I achieve that?
(async () => {
const reponse = await fetch(url, {
method: "GET",
});
console.log(reponse.headers.get("Content-Type"));
})();