title: Making a x-www-form-urlencoded request with axios
body: <pre class="lang-js prettyprint-override"><code>const { user } = require('./config');
  const axios = require('axios');
  
  const Querystring = require('querystring');
  
  let body = Querystring['stringify']({
      email: 'MY EMAIL@email.com',
      password: 'pass'
  })
  
  const config = {
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  }
  
  axios['post']('https://minecraftservers.org/login', body, config)
  ['then'](response =&gt; console.log(response))
  </code></pre>
  
  <p>Im trying to login through a website
  it doesn't have an api
  the headers are correct
  if you're wandering how i knew this, i used chrome dev tools
  like reverse engineer</p>
  
  <pre><code>content-type: application/x-www-form-urlencoded
  </code></pre>
  
  <p>that's the header they used when i tried to login to the site</p>
  
  <p>this is what i get when i logged in through the site and not the code, it works there.
  <a href="https://i.stack.imgur.com/BB4QZ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/BB4QZ.png" alt="image"></a></p>