Hi I am using axios with react, and I am facing a strange issue. After every get request, the axios library makes a 204 request. Is it supposed to be this way, or am I doing something incorrectly ? Here is the required stack trace from the backend.
> [email protected] start /Users/Yogesh/Projects/Droidsize/Projectwise/server
> node server.js
App is running
OPTIONS /api/profile 204 5.096 ms - -
GET /api/profile 401 28.648 ms - -
OPTIONS /api/projects 204 0.806 ms - -
GET /api/projects 200 54.032 ms - 2810
OPTIONS /api/projects 204 0.749 ms - -
GET /api/projects 304 12.336 ms - -
OPTIONS /api/projects 204 0.582 ms - -
GET /api/projects 304 8.735 ms - -
OPTIONS /api/projects 204 0.147 ms - -
GET /api/projects 304 3.802 ms - -
OPTIONS /api/profile 204 0.095 ms - -
GET /api/profile 401 5.123 ms - -
OPTIONS /api/profile 204 0.196 ms - -
And here is the screenshot of the chrome network tab.
Axios isn't making those requests, the browser is. Please take a look at CORS.
Most helpful comment
Axios isn't making those requests, the browser is. Please take a look at CORS.