I am trying to request server via HTTPS POST method in ionic. But some of reason, it failed every time. I don't know why this happened? Are there any correct way?
$http({
url: "https://beta.test.com/auth/authenticate/",
method: "POST",
data: {userName: "xxx", password: "xxx", ipAddress: "xxx", remeberMe: true},
headers: {'Content-Type': 'application/json'}
}).success(function (res) {
$scope.persons = res; // assign $scope.persons here as promise is resolved here
}).error(function (res) {
$scope.status = status;
});