title: AngularJS Http Post does not return success
body: <p>This is service for sending data to Rest which rest return StatusText = "OK"</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>service.Login = function(username, password, callback) {
       var encodedString = 'username=' + encodeURIComponent(username) + '&amp;password=' + encodeURIComponent(password);
       var baseUrl = "https://localhost:450/rest/";
       $http({
           method: 'POST',
           url: baseUrl + "dns/loginResource",
           data: encodedString,
           headers: {
               'Content-Type': 'application/x-www-form-urlencoded'
           }
       }).then(function(response) {
           var data = response.statusText;
           console.log(data);
           callback(data);
       }, function(error) {
           var data = error.data;
           console.log(data);
           callback(response);
       });</code></pre>
  </div>
  </div>
  </p>
  
  <p>End this is controller for handle with callback</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$scope.login = function() {
      alert("Scope'a girdi...");
      AuthenticationService.Login($scope.username, $scope.password, function(response) {
          if (response.success) {
              AuthenticationService.SetCredentials($scope.username, $scope.password);
              $location.path('/admin');
          } else {
              $scope.error = response.message;
              console.log("Response not success");
          }
      });</code></pre>
  </div>
  </div>
  </p>
  
  <p>However, code neve enter success function. </p>