title: Error: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body
body: <p>I'm using fetch to call <a href="https://developers.google.com/maps/documentation/timezone/overview#maps_http_timezone-js" rel="nofollow noreferrer">Google TimeZone</a>. But I'm getting an error when trying to pass the lat/lng and timestamp in as body paramters.</p>
  <blockquote>
  <p>Error: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body</p>
  </blockquote>
  <p>Here is my code.
  Does Google allow it to be called this way?</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const data = new FormData();
  data.append('location', this.latitude.value + ',' + this.longitude.value);
  data.append('timestamp', Math.floor(Date.now() / 1000).toString());
  data.append('key', 'my google API key')
  const timeZoneResult = await fetch('https://maps.googleapis.com/maps/api/timezone/json', {
    method: 'GET',
    headers: {},
    body: data,
  });
  const timeZone = await timeZoneResult.json();</code></pre>
  </div>
  </div>
  </p>
  <p>This way, all in the url string, works fine!</p>
  <blockquote>
  <p><a href="https://maps.googleapis.com/maps/api/timezone/json?location=39.6034810%2C-119.6822510&amp;timestamp=1331161200&amp;key=myKeyHere" rel="nofollow noreferrer">https://maps.googleapis.com/maps/api/timezone/json?location=39.6034810%2C-119.6822510&amp;timestamp=1331161200&amp;key=myKeyHere</a></p>
  </blockquote>