Skip to content

Commit 9646ce1

Browse files
committed
Merge branch '6.3' into 6.4
* 6.3: Add information to sub request
2 parents dd9a42d + 485b520 commit 9646ce1

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
@@ -728,6 +728,14 @@ look like this::
728728
// ...
729729
}
730730

731+
.. note::
732+
733+
The default value of the ``_format`` request attribute is ``html``. If your
734+
sub request returns a different format (e.g. ``json``) you can set it by
735+
defining the ``_format`` attribute explicitly on the request::
736+
737+
$request->attributes->set('_format', 'json');
738+
731739
.. _http-kernel-resource-locator:
732740

733741
Locating Resources

0 commit comments

Comments
 (0)