I have some pretty vanilla code, but can't seem to figure out the issue. On the server side, I get an empty object in the body of the request when sending the POST below. I'm using express on the server side. My server side works fine when I use Postman, so the server side isn't the issue as far as I can tell. From everything I can find, the code below should work just fine:
$http({
method: 'POST',
url: 'http://localhost:5000/authRequest',
headers : { 'Content-Type' : 'application/json' },
body: {
'test' : 'test'
}
});
Any thoughts?
bodyit looks that you must read the official documentation here docs.angularjs.org/api/ng/service/$http. The correct property is thedataonetyle(ortypefor that matter).methodis correct.