title: 400 Bad Request from Axios to Django, field is required
body: <p>I'm trying to send a POST request from my React frontend using Axios</p>
  
  <pre><code>import axios from 'axios'
  axios.post('http://server:port/auth/login', {
      username: 'admin', 
          password: 'MY_PASSWORD', 
  
  }, {
          headers: {
              'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
          }
  })
  .then(response =&gt; { 
      console.log(response)
  })
  .catch(error =&gt; {
      console.log(error.response)
  });
  </code></pre>
  
  <p>No matter what I do, I get a 400 Bad Request in response stating:</p>
  
  <pre><code>"username":[This field is required],
  "password":[This field is required]
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/leXwz.png" alt="Image of the error"></p>
  
  <p>I am using the <a href="https://github.com/davesque/django-rest-framework-simplejwt" rel="nofollow noreferrer">Django REST framework</a> in my Django Backend for authentication.</p>
  
  <p>Everything works fine using Insomnia but any requests through React results in a "Bad Request"</p>
  
  <p><img src="https://i.stack.imgur.com/FaEMq.png" alt="Insomnia"></p>
  
  <p>django-cors-headers has been installed and configured as well.</p>