php://input is working properly in localhost. But in server it returns empty. Input( request ) to my site is a json(REST - application/json typ
php://input
json
I know this is old, but it might help others:
Careful with single quotes inside your json
From the PHP documentation about json_decode:
the name and value must be enclosed in double quotes single quotes are not valid $bad_json = "{ 'bar': 'baz' }"; json_decode($bad_json); // null