title: How to get Json Post Values with asp.net webapi
body: <p>i'm making a request do a asp.net webapi Post Method, and i'm not beeing able to get a request variable.</p>
  
  <p><strong>Request</strong></p>
  
  <pre><code>jQuery.ajax({ url: sURL, type: 'POST', data: {var1:"mytext"}, async: false, dataType: 'json', contentType: 'application/x-www-form-urlencoded; charset=UTF-8' })
      .done(function (data) {
          ...
      });
  </code></pre>
  
  <p><strong>WEB API Fnx</strong></p>
  
  <pre><code>    [AcceptVerbs("POST")]
      [ActionName("myActionName")]
      public void DoSomeStuff([FromBody]dynamic value)
      {
          //first way
          var x = value.var1;
  
          //Second way
          var y = Request("var1");
  
      }
  </code></pre>
  
  <p>i Cannot obtain the var1 content in both ways... (unless i create a class for that)</p>
  
  <p>how should i do that?</p>