const handlecheck = async ()=>{
const body ={ nameform: formdata.nameuser,emailform: formdata.email, messageform:formdata.messagebox,subjectform:formdata.subject }
await appFetch(‘/api/mail’, {
method: ‘POST’,
body: JSON.stringify(body),
headers: {
“Content-Type”: “application/json”,
}
})
}
this is react js file in which appFetch is nothing but this
const appFetch = useAuthenticatedFetch();
app.post(‘/api/mail’, async (req, res) => {console.log(req.body)}
in this req.body no data displayed in console , frontend side having issue