Skip to content

Commit c01ea6a

Browse files
Update http_kernel.rst
1 parent 3ce2c1a commit c01ea6a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

components/http_kernel.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,11 @@ look like this::
742742

743743
.. _http-kernel-resource-locator:
744744

745+
Also, note that by default, if the ``_format`` attribute if not set in your request, the value will be ``html``.
746+
So, if your sub request return something else than ``html`` (like json for instance) you can set it like this::
747+
748+
$request->attributes->set('_format', 'json');
749+
745750
Locating Resources
746751
------------------
747752

0 commit comments

Comments
 (0)