I'm working on my first android app in Ionic framework. My app should communicate with a REST interface from AngularJS. When I'm testing the app in a browser on my pc then everything works just fine but when I'm running it as an android app from a virtual or a real android device then the POST request doesn't work at all. The GET requests work perfectly. I don't have a clue why it's happening so I appreciate any help!
Part of the code:
$http({
url: address,
method: "POST",
data: jsondata,
transformRequest: false,
headers: { 'Content-Type': undefined }
})
.success(function (data) {
$scope.errormsg = "success";
reloadComments();
})
.error(function (data) {
$scope.errormsg = data;
});