Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $http({
- method: 'POST',
- url: 'http://localhost:8080/DemoWebApplication/api/authenticate',
- headers: {'Content-Type': 'application/x-www-form-urlencoded'},
- transformRequest: function(obj) {
- var str = [];
- for(var p in obj)
- str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p]));
- console.log(str.join("&"));
- return str.join("&");
- },
- data: {user: 'selvyn', password: 'gradprog2016' }
- }).then(function(response) {
- $scope.myWelcome = response.data;
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement