I'm trying post request by my react app and I have return status 415. I tested this endpoint by postman exactly which I got from this console.log(JSON.stringify(data.data)); and all is right. I notice that my request haven't the same content-type which I set in fetch method.
fetch("http://localhost:8080/v1/useranswers", {
method: "POST",
mode: "no-cors",
headers: {
Accept: " */*",
"Content-Type": "application/json",
},
body: JSON.stringify(data.data),
}).then(function (response) {
return response;
});