title: How to grab data using fetch() API POST method in PHP?
body: <p>I am trying to use <code>fetch()</code> API POST method in order to grab the POST data in PHP.</p>
  
  <p>Here is what I have tried:</p>
  
  <pre><code>var x = "hello";
  fetch(url,{method:'post',body:x}).then(function(response){
      return response.json();
  });
  </code></pre>
  
  <p>PHP:</p>
  
  <pre><code>&lt;?php
  if(isset($_GET['x']))
  {
      $get = $_GET['x'];
      echo $get;
  }
  ?&gt;
  </code></pre>
  
  <p>Is this correct?</p>