Advertisement
eimkasp

Angularjs HTTP problem

Jun 11th, 2014
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.      $scope.SignUp = function () {
  2.  
  3.             $http({
  4.                 method: $scope.method,
  5.                 url: $scope.url,
  6.                 data: {searchTerm: "Yoshi", searchType: "post"},
  7.                 crossDomain : true,
  8.                 headers: {
  9.                     'Session-id' : 'Basic d2VudHdvcnRobWFuOkNoYW5nZV9tZQ==',
  10.                     "Access-Control-Allow-Origin" : "http://local.scriball.com",
  11.                 }
  12.  
  13.             }).
  14.                     success(function (data, status) {
  15.                         $scope.status = status;
  16.                         $scope.data = data;
  17.                     }).
  18.                     error(function (data, status) {
  19.                         console.log(status);
  20.                         $scope.data = data || "Request failed";
  21.                         $scope.status = status;
  22.                     });
  23.         };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement