title: How to POST content as application/x-www-form-urlencoded
body: <h2>angularjs $http.post is refusing to use my Content-Type</h2>
  <p>I am working with a contractor - their team are making server-side APIs while I'm putting together a javascript application using angularjs.  They insist on making the api only allow calls with <code>application/x-www-form-urlencoded</code> calls, so I'm trying to figure out how to use $http to make a urlencoded call, and running into problems.  All the instruction pages I'm finding seem focused on older versions of angularjs.</p>
  <p>I try using the below code:</p>
  <pre><code>$scope.makeApiCall = function(  ){
      var apiData = {
                      &quot;key1&quot; : &quot;value1&quot;,
                      &quot;key2&quot; : &quot;value2&quot;
                  };
      var apiConfig = {
                      &quot;headers&quot; : {
                          &quot;Content-Type&quot; : &quot;application/x-www-form-urlencoded;charset=utf-8;&quot;
                      }
                  };
      return $http.post('/Plugins/apiCall', apiData, apiConfig)
      .then(function(response){
          $scope.data=response.data;
      });
  };
  </code></pre>
  <p>But when I make the call, instead of using the Content-Type I provided, the developer tools report that it uses <code>Content-Type: text/html; charset=utf-8</code></p>
  <p>How do I get my <code>$http.post</code> to send the right Content-Type?</p>