title: I am sending raw JSON data through postman to a PHP function (PUT method). file_get_contents('php://input') gives null
body: <p>I am trying to get the raw data passed through <code>$_POST = json_decode(file_get_contents('php://input'));</code> but <code>file_get_contents('php://input')</code> gives an empty string (instead of the raw data that I passed)</p>
  <p>Some more information if it helps:</p>
  <ul>
  <li>allow_url_fopen is on in php.ini</li>
  <li>I am using PUT method to send data</li>
  <li>Content-Type is <code>application/json</code></li>
  </ul>
  <p><a href="https://i.stack.imgur.com/0U2Tt.png" rel="nofollow noreferrer">Postman 1</a>
  <a href="https://i.stack.imgur.com/EfHBA.png" rel="nofollow noreferrer">Postman 2</a></p>