Answer the question
In order to leave comments, you need to log in
Why is there no response from the server?
Hello. I send a request to the server via fetch:
function sendRequest(url, data) {
const response = fetch(url, {
method: 'POST',
headers: {
'Content-Type' : 'application/json'
},
body: JSON.stringify(data)
});
return response;
}
router.post('/sign-up', (req, res) => {
controller.createUser(req.body)
.then(data=> {
res.send(data);
});
});
res.json(response)
, but the same problem. Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question