Luracast/Restler — Issue #32: how do i get content from what i HTTP PUT
Author: crapthings
Created: 2012-03-01 09:51:08+00:00
State: open

when i use a "HTTP PUT" method to put something as json format, how do i trans my json to array ?
i try to use this

$put_data = json_decode(file_get_contents('php://input'), true);
var_dump($put_data);

then i got nothing

my function is like

// request put
function putpatients($id) {
$put_data = json_decode(file_get_contents('php://input'), true);
var_dump($put_data);
}