title: fetch API with POST method giving me 500 (Internal Server Error)
body: <p>I'm using a fetch with POST method to get data from an API in my index.html page but am getting 500 status code, can somebody please guide me on what could be wrong in my code</p>
  
  <pre><code>&lt;body&gt;
  &lt;h1&gt;Flights Finder&lt;/h1&gt;
  
  &lt;script type="text/javascript"&gt;
  fetch("https://skyscanner-skyscanner-flight-search-v1.p.rapidapi.com/apiservices/pricing/v1.0", {
      'method': 'POST',
      'headers': {
        'x-rapidapi-host': 'skyscanner-skyscanner-flight-search-v1.p.rapidapi.com',
        'x-rapidapi-key': 'API_KEY',
        'content-type': 'application/x-www-form-urlencoded'
      },
      'body': {
        'inboundDate': '2019-11-24',
        'cabinClass': 'business',
        'children': '0',
        'infants': '0',
        'country': 'US',
        'currency': 'USD',
        'locale': 'en-US',
        'originPlace': 'SFO-sky',
        'destinationPlace': 'LHR-sky',
        'outboundDate': '2019-11-16',
        'adults': '1'
      }
  })
  .then(response =&gt; {
      console.log(response);
  })
  
  .catch(err =&gt; {
      console.log(err);
  });
  &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>