Reputation: 15889
If a client sent a PUT request with an array for example:
$a = array('age' => 18);
$rest->put('/api/users/9', $a);
How does your rest API get the $a array?
Upvotes: 1
Views: 238
Reputation: 179046
You can read the request body at php://input
, but be warned that it's volatile and can only be read once*.
file_get_contents('php://input');
You'll then need to parse this as a URL to use it as an array.
* details are on the linked page
Upvotes: 2