Advertisement
Guest User

Untitled

a guest
Apr 6th, 2017
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. {
  2. "data": null,
  3. "status": -1,
  4. "config": {
  5. "method": "POST",
  6. "transformRequest": [
  7. null
  8. ],
  9. "transformResponse": [
  10. null
  11. ],
  12. "data": {},
  13. "url": "http://api.elpozon.com/rest/login",
  14. "headers": {
  15. "Accept": "application/json",
  16. "Content-Type": "application/json;charset=utf-8"
  17. }
  18. },
  19. "statusText": ""
  20. }
  21.  
  22. $scope.intentoDeLoginPozon = function(){
  23.  
  24. var datapost = {
  25. method: 'POST',
  26. data: {
  27. user : $scope.username,
  28. pass: $scope.password
  29. },
  30. url: 'http://api.elpozon.com/rest/login',
  31. headers:{
  32. 'Accept': 'application/json'
  33. }
  34. };
  35.  
  36. $http(datapost).then(function successCallback(response){
  37. $scope.mensaje = response;
  38.  
  39.  
  40. }, function errorCallback(response){
  41. $scope.error = response;
  42.  
  43. });
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement