Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

$http triggered twice

$
0
0

@eldy wrote:

This is my code

$scope.login = function(email,password){
$http({
method: 'POST',
url: 'http://localhost:3000/api/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)
});
}

But in my network tab I'm seeing 2 request, one is by ionic :slightly_smiling:

The second one is my POST request, I wonder why there's one OPTION method up there.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>