Skip to content

Commit 4b7c2ce

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: Add information to sub request
2 parents a1c346b + 9646ce1 commit 4b7c2ce

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

components/http_kernel.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,14 @@ look like this::
705705
// ...
706706
}
707707

708+
.. note::
709+
710+
The default value of the ``_format`` request attribute is ``html``. If your
711+
sub request returns a different format (e.g. ``json``) you can set it by
712+
defining the ``_format`` attribute explicitly on the request::
713+
714+
$request->attributes->set('_format', 'json');
715+
708716
.. _http-kernel-resource-locator:
709717

710718
Locating Resources

0 commit comments

Comments
 (0)