Monday 23 October 2017

I Successfully make Ajax call from React to Node. But res.redirect Not Working ?

On the client Side i make an ajax call to the node:const res = await axios.post('/api/stripe', toPost); where 'toPost' is an object with a bunch of key value pairs which I need on the backend.After doing a few bits on the backend I then want to redirect the user to the 'thank you' page. So I thought i could end the response with something as simple asres.redirect('/thankyou'); Although this shows up in the network tab on developer tools with status code 200. Nothing happens.Would be very grateful for any help.

Submitted October 23, 2017 at 05:53PM by harrydry

No comments:

Post a Comment