title: Sending post formData with axios doesn't work, but with request does
body: <p>I am trying to migrate from <a href="https://www.npmjs.com/package/request" rel="nofollow noreferrer">request</a> to <a href="https://www.npmjs.com/package/axios" rel="nofollow noreferrer">axios</a>, since request has been deprecated.<br>
  Suppose that the url '<a href="https://www.example.com" rel="nofollow noreferrer">https://www.example.com</a>' receives a post request with formdata that contains login information, and prints 'Logged in' on success and 'Could not log in' otherwise(I can't share the url for privacy reasons).<br>
  I have the following code, which uses axios and prints 'Could not log in':</p>
  
  <pre><code>axios = require('axios')
  FormData = require('form-data')
  form = new FormData()
  form.append('email', 'example@gmail.com')
  form.append('password', '1234')
  axios({
      method: 'post',
      url: 'https://www.example.com',
      data: form
  }).then(function (response) {
      console.log(response['data']); // Prints "Could not log in"
  }).catch(function (error) {
      console.log(error);
  })
  </code></pre>
  
  <p>I also have the following code, which uses request and prints 'Logged in':</p>
  
  <pre><code>request = require('request')
  request.post({
      url: 'https://www.example.com',
      method: 'POST',
      formData: {
          'email': 'example@gmail.com',
          'password': '1234'
      }
  }, function(error, response, body) {
      console.log(body); // Prints "Logged in"
  })
  </code></pre>
  
  <p>Why does the operation work using request but not axios?</p>