Thanks to Dimitry, not exactly what I was looking for, but a great hint to find a solution:
$client->request( 'PUT', '/test', array(), array(), array( 'CONTENT_TYPE' => 'application/json', 'HTTP_X-Requested-With' => 'XMLHttpRequest' ), '{"id":"34"}' );
Your solution had one empty array, and the idea was to pass JSON as a string!
Thanks a lot! Greetings
source share