I am currently trying to upload some data to my self-written backend using the angularjs $http object. Using this object I have some weird behavior in my coding. When I run my application using the emulator from the Intel XDK IDE I have no problems. When I run the application on my real Smartphone my $http calls make some problems.
I debugged my application and in the network overview my calls return a responsecode 200. Anyways the .error(...) handling is performed and the .success(...) handling is skipped.
My coding looks like this:
$http({
method: 'POST',
url: dbServerPath + "SetStatUser.php",
data: exporting
}).success(function (response) {
console.log(response);
successSave();
}).error(function (response, code) {
console.log(response);
console.log(code);
errorSave();
});
it looks like it returns the error even if the call is not finished.
The problem must be at the frontend. Because I have tested my backend using Postman.
Edit: For further clarification, my backend returns nothing, it just processes the data given with the request payload. Firefox and Google Chrome track the response with the http code 200 but the angularjs object $http tracks it as a 404. So my by backend can not be the trigger for this weird behavior.