Hey guys,

I am running into a strange issue that only occurs on one ‘DELETE’ request sent to only one endpoint.

r/webdev - Request body not sending to Express when using Axios in React, but works in Postman

Ignore the cut off, its used for MongoDB, but commented out everything but this and a response

When I run the request in Postman, the console logs the body object and the entry is in there.

r/webdev - Request body not sending to Express when using Axios in React, but works in Postman
r/webdev - Request body not sending to Express when using Axios in React, but works in Postman

However, when running the same request from React using Axios, the console doesnt recieve the body for some reason.

r/webdev - Request body not sending to Express when using Axios in React, but works in Postman
r/webdev - Request body not sending to Express when using Axios in React, but works in Postman

I am totally lost as to what is going on here. Could I get some guidance? I’m seriously interested in finding out what my mistake was 😀



Source link

Write A Comment