title: How do I POST a x-www-form-urlencoded request using Fetch?
body: <p>I have some parameters that I want to POST form-encoded to my server:</p>
  
  <pre><code>{
      'userName': 'test@gmail.com',
      'password': 'Password!',
      'grant_type': 'password'
  }
  </code></pre>
  
  <p>I'm sending my request (currently without parameters) like this</p>
  
  <pre><code>var obj = {
    method: 'POST',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
    },
  };
  fetch('https://example.com/login', obj)
    .then(function(res) {
      // Do stuff with result
    }); 
  </code></pre>
  
  <p>How can I include the form-encoded parameters in the request?</p>