Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions components/http_foundation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,15 @@ If the request body is a JSON string, it can be accessed using
.. versionadded:: 5.2

The ``toArray()`` method was introduced in Symfony 5.2.

If the request body is a JSON string, can be accessed as Object using
:method:`Symfony\\Component\\HttpFoundation\\Request::toObject`::

$data = $request->toObject();

.. versionadded:: 6.1

The ``toObject()`` method was introduced in Symfony 6.1.

Identifying a Request
~~~~~~~~~~~~~~~~~~~~~
Expand Down