title: AngularJS - $http.post send data as json
body: <p>I'm working on autocomplete directive with angularjs but having some issues.</p>
  
  <p>I have a form which have an autocomplete input. When i type something there, the <strong>term variable</strong> is sent as JSON:</p>
  
  <p><img src="https://i.stack.imgur.com/vfWYF.jpg" alt="enter image description here"></p>
  
  <p>But, when i use the same function (from different angular controller, but the same function) in another form the <strong>term variable</strong> sent perfectly and the autocomplete works fine:</p>
  
  <p><img src="https://i.stack.imgur.com/3xxdh.jpg" alt="enter image description here"></p>
  
  <p>Here is my angular function:</p>
  
  <pre><code>$scope.getCustomers = function (searchString) {
      return $http.post("/customer/data/autocomplete",
          {term: searchString})
          .then(function (response) {
              return response;
          });
  };
  </code></pre>
  
  <p>What do you think is wrong?</p>