How can I get PUT body parameters using HttpFoundation component (without Symfony)?
According the docs Request::createFromGlobals
only about POST, GET ... but not PUT. So here I cannot use like $request->request->all()
, it will be empty.
I believe there is a more nicer way then
$request = Request::createFromGlobals;
$content = $request->getContent();
// Parsing $content
This way json_decode($request->getContent(), true);
returns null
.
Please share your experience.