title: how to pass null as value of a variable in data of ajax method
body: <p>I want to send a null value in the "mailID" field as email id is not a required field in the form.</p>
  
  <pre><code>var app = angular.module('MyApp', [])
  app.controller('MyController', function($scope, $http, $window) {
      $scope.ButtonClick = function() {
          var post = $http({
              method: "POST",
              url: "url",
              dataType: 'json',
              data: {
                  name: $scope.Name,
                  mailID: $scope.MailID,
              },
              headers: {
                  "Content-Type": "application/json"
              }
          });
          post.success(function(data, status) {
              $window.alert(data.d);
          });
          post.error(function(data, status) {
              $window.alert(data.Message);
          });
      }
  });
  </code></pre>