$scope.login = function(email,password){
$http({
method: 'POST',
url: 'http://example.com/login',
headers: {
'owner': $rootScope.secret
},
data: {email:email, password:password }
}).then(function successCallback(response) {
console.log(response.data)
}, function errorCallback(response) {
console.log(response.data)
});
}
However, upon checking my network tab, I noticed two requests being made. One of the requests is from Ionic:
https://i.sstatic.net/6MXKA.jpg
The second request is the POST request that I initiated. I am curious about the presence of the OPTION method in the initial request.