I send the object to the backend (Node js) when API call, but I check objects using console log. I checked using POSTMAN. When I checked POSTMAN, it worked very well, but I try to pass an object in the frontend (react js) it is shown as undefined.
getnotification(){
const userdetails={
userid:"1235",
username:this.state.name
}
axios.get('http://localhost:4000/notification/',userdetails)
.then((res)=>{ this.setState((cur) => ({ ...cur, notification: res.data.reverse() }));
})
}