Skip to content

Instantly share code, notes, and snippets.

@kristiyandobrev
Created September 1, 2015 10:45
Show Gist options
  • Save kristiyandobrev/3712bc65c70b1159c776 to your computer and use it in GitHub Desktop.
Save kristiyandobrev/3712bc65c70b1159c776 to your computer and use it in GitHub Desktop.
$scope.login = function() {
var req = {
method: 'POST',
url: 'http://example.com',
headers: {
'Content-Type': 'application/json; charset=UTF-8'
},
crossDomain: true,
data: {
email: $scope.data.email,
password: $scope.data.password
}
};
/* Executing the request */
$http(req).then(function(res) {
//getting the response
Console.log(res);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment