ReactJS Axios GET request returns empty array while Postman shows correct data
I am trying to implement a login function in my ReactJS component where I make two API calls using Axios. The first API call sends the user’s email and password to get a JWT token in response. The second API call uses this token to fetch user-specific notes from the backend. However, while this works correctly in Postman, my ReactJS code returns an empty array for the notes.
ReactJS Axios POST request returns empty array while Postman shows correct data
I am trying to implement a login function in my ReactJS component where I make two API calls using Axios. The first API call sends the user’s email and password to get a JWT token in response. The second API call uses this token to fetch user-specific notes from the backend. However, while this works correctly in Postman, my ReactJS code returns an empty array for the notes.