score:0

get doesn’t accept sending a body, use post instead:

router.post('/login', async function(req,res) {

// …

const response = await axios.post("http://localhost:3002/login", { email, pass })

also, the response.config.body is not a thing, if you look at request config documentation, there is the property “data”, rather than “body”.

console.log(response.config.data);

hopefully that helps!


Related Query

More Query from same tag