I've tried this piece of code:
fetch("http://localhost:5000/api/signin", {
method: "post",
headers: {
"Content-Type": "application/json",
Authorization: "this-can-be-anything"
},
body: JSON.stringify({
email: this.state.email,
password: this.state.password
})
})
.then(response => {
console.log(response);
response.json();
})
.then(data => {
console.log(data);
});
It's a try to see if everything is good, if I try on Postman to call http://localhost:5000/api/signin everything work and here too but I don't get anything back. I get on network tab a call that get me the data I want, and another from the line I call the fetch with status 204.
No content, why?