title: Postman form-data and x-www-form-urlencoded work but raw json doesn't
body: <p>I have a form that sends credentials to an endpoint for authentication and it should return a token. I want to replace the HTML form with javascript but I can't get it to work. To find out why it doesn't work I've tried to do the same with Postman and I get the result that when I send the POST request with body as form-data it works fine. Sending it as x-www-form-urlencoded also works fine, but when I send it as json (Content-Type: &quot;application/json&quot;) it doesn't.</p>
  <p>The request JSON data:</p>
  <pre><code>{
      &quot;username&quot;: &quot;my_username&quot;,
      &quot;password&quot;: &quot;my_password&quot;,
      &quot;referer&quot;: &quot;http://127.0.0.1:5500&quot;,
      &quot;f&quot;: &quot;json&quot;
  }
  </code></pre>
  <p>my_password contains letters, dots and underscores but no other special characters. my password only has an exclamation mark as a special character.</p>
  <p>Can the endpoint distinguish between a form being sent or javascript (fetch API)? Also, is there any reason why an endpoint could not work when sending json instead of the other two options?</p>