title: How to pass data to controller using Fetch api in asp.net core
body: <p>I post data using fetch like this in my client js scripts</p>
  
  <pre><code>    fetch('/myarea/mycontroller/myaction', {
          method: 'post',
          body: JSON.stringify({ name: namevalue, address: addressvalue })
      })
          .then(function (response) {
              if (response.status !== 200) {
                  console.log('fetch returned not ok' + response.status);
              }
  
              response.json().then(function (data) {
                  console.log('fetch returned ok');
                  console.log(data);
              });
          })
          .catch(function (err) {
              console.log(`error: ${err}`);
          });
      }, false);
  </code></pre>
  
  <p>Then on my controller</p>
  
  <pre><code>    [HttpPost]      
      public async Task&lt;IActionResult&gt; MyAction(string name, string address)
      {
          // Error, name and address is null here, shouldn't be!
          // more code here ...
      }
  </code></pre>
  
  <p>My controller action is being called correctly, and I am able to debug inside it, but no data being passed. What could be wrong here? Thanks</p>