title: Unable to post simple string data to Web API from AngularJS
body: <p>I am trying to get a json string from my angular app to a Web API. I have looked all over the internet the past 6 hours trying and failing miserably to figure out what I am doing wrong.</p>
  
  <p>I have checked the network console and I can see the json as form data, but my WEB api for some reason is NOT getting it. I have looked at several other posts but none seem to help with my particular issue. Any direction would be great. I already tried using the "transform" fix, but that didn't help.</p>
  
  <p>ENTRY POINTS TO WEB API</p>
  
  <pre><code>[HttpPost]
  [Route("api/SkeltaInterfaceController/SaveWorkflow")]
  public bool SaveWorkflow([FromBody] string json)
  {
      ...
  }
  </code></pre>
  
  <p>ANGULAR CALL</p>
  
  <pre><code>$scope.SaveWorkFlow = function () {
      $http({
          headers: {'Content-Type': 'application/x-www-form-urlencoded'},
          method: "POST",
          url: webAPI,
          data: {'DATA' : 'TEST DATA'
          }
      })
  }
  </code></pre>
  
  <p><strong>EDIT: I</strong> changed the angular call to this</p>
  
  <pre><code>$scope.SaveWorkFlow = function () {
      $http({
          headers: {'Content-Type': 'application/x-www-form-urlencoded'},
          method: "POST",
          url: webAPI,
          data: {'DATA' : 'TEST DATA'}
      })
  }
  </code></pre>
  
  <p>The Web API looks like this</p>
  
  <pre><code>[HttpPost]
  [Route("api/SkeltaInterfaceController/SaveWorkflow")]
  public bool SaveWorkflow([FromBody] TestModel json)
  {
      ...
  }
  </code></pre>
  
  <p>And the model</p>
  
  <pre><code>public class TestModel
  {
      public string DATA { get; set; }
  }
  </code></pre>
  
  <p>I am still getting a null value for DATA though, something I setup wrong?</p>