Ok, I've tried looking at this How can I post data as form data instead of a request payload?
However, I still can't seem to send my request properly. Here are the details.
$scope.myData = {a: 123, b: 456};
$http({
url: 'myfile',
method: "POST",
data: JSON.stringify($scope.myData),
headers: {'Content-Type': 'application/json'}
})
This keeps being sent as request payload. Any ideas?
When I use 'application/x-www-form-urlencoded'
The formdata is used however it is not parsed properly and the whole json is just one string when I look in the Chrome console.