axios.get(url, {
headers: {
'Content-Type': 'application/json',
}
})
.then(response => {
console.log('response',response);
})
.catch((error) => {
console.log('error ' + error);
});
I tried to set the header " 'Content-Type': 'application/json'"
to solve this problem, it works fine on my postman, but I get 415 on my browser and axios
request in React.
Is it possible to solve this issue on my frontend?