title: AngularJS - transformRequest is not getting called on $resource
body: <p>I am adding a pair of actions to an AngularJS resource, but when I invoke the action, my transformRequest function is not getting called:</p>
  
  <pre><code>    var _resource = $resource('api/NewItem/:id',
      { id: '@id' },
      {
          create: {
              method: 'POST',
              transformRequest: function (data, headersGetter) {
                  var result = JSON.stringify(data.productIntro);
                  return result;
              }
          },
          update: {
              method: 'PUT',
              transformRequest: function (data, headersGetter) {
                  var result = JSON.stringify(data.productIntro);
                  return result;
              }
          }
      });
  </code></pre>
  
  <p>If I add the function globally on the app, it works:</p>
  
  <pre><code>var newItemApp = angular.module('newItemApp', ['ngResource'])
  .config(function ($httpProvider) {
      $httpProvider.defaults.transformRequest = function(data)
      {
          if (data === undefined) {
              return data;
          }
          var result = JSON.stringify(data.productIntro);
          return result;
      };
  });
  </code></pre>
  
  <p>What I need to do is remove the root element from any POST or PUT action because the default model binding in Web Api does not bind a json object when that object has a named root.</p>