I have a simple Axios POST request:
const data = JSON.stringify({
to: receiver,
from: sender,
body: message
});
axios.post(window.location.origin + '/sms/outgoing', data)
My issue is that my api reads the request body as this:
{ '{"to":"12345","from":"54321","body":"message"}': '' }
when I want it to be this:
{"to":"12345","from":"54321","body":"message"}
Where am I going wrong?