title: I cant send correctly the body
body: <p>Im using an app (<code>nodeJS</code>) which need catch email and password in the body of request to drop a token.
  Im using react in frontEnd to make the post using <code>fetch</code> but, when i made the post using a <code>onClick</code> event, and i watch the console of API, the body is not correctly formed.</p>
  <blockquote>
  <p>{
  '{&quot;email&quot;:&quot;johndoe@gmail.com&quot;,&quot;password&quot;:&quot;Johnismyname&quot;}': '   '
  }</p>
  </blockquote>
  <p>The problem isn't the API because i tested it with postman and works correctly.
  The problem is in the react code i guess because im still learning.
  This is the code in react:</p>
  <pre><code>    import { Link } from &quot;react-router-dom&quot;
      import { useRef, useState } from 'react';
      export default function Login() {
      const [token, setToken] = useState('') 
      const LOGIN_API_URL = &quot;http://localhost:3010/api/v1/users/login&quot;
      const GET_USER_API_URL = &quot;http://localhost:3010/api/v1/users/getuser&quot;
      const userEmail = useRef();
      const userPassword = useRef();
      async function apiCall(email, password, tokenUrl, userUrl) {
          const body = JSON.stringify({
              email: email,
              password: password
          });
          const fetchConfig = {
              method: &quot;POST&quot;,
              headers: {
                  &quot;Accept&quot;: &quot;application/json&quot;,
                  &quot;Content-Type&quot;: &quot;application/x-www-form-urlencoded&quot;
              },
              body
          }
          const response = await fetch(tokenUrl, fetchConfig)
          const data = await response.json()
          console.log(data);
          return setToken(data.token)
      }
      return (
          &lt;div className=&quot;login-container&quot;&gt;
              &lt;div className=&quot;inputs-container&quot;&gt;
                  &lt;h1&gt;Login&lt;/h1&gt;
                  &lt;input ref={userEmail} type=&quot;email&quot; name=&quot;email&quot; id=&quot;email&quot; placeholder=&quot;email&quot;/&gt;
                  &lt;input ref={userPassword }type=&quot;password&quot; name=&quot;password&quot; id=&quot;password&quot; placeholder=&quot;password&quot; /&gt;
                  &lt;div
                      className=&quot;button-submit&quot;
                      onClick={() =&gt; {
                          apiCall(userEmail.current.value, userPassword.current.value, LOGIN_API_URL, GET_USER_API_URL)
                      }}
                  &gt;
                      Join
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;h3&gt;&lt;Link className=&quot;register hover-expands&quot; to=&quot;/register&quot;&gt;Register&lt;/Link&gt;&lt;/h3&gt;
          &lt;/div&gt;
      )
  }
  </code></pre>