Skip to content

Commit 6536e36

Browse files
committed
Merge branch '7.0' into 7.1
* 7.0: Add information to sub request
2 parents e85d63b + 4b7c2ce commit 6536e36

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
@@ -716,6 +716,14 @@ look like this::
716716
// ...
717717
}
718718

719+
.. note::
720+
721+
The default value of the ``_format`` request attribute is ``html``. If your
722+
sub request returns a different format (e.g. ``json``) you can set it by
723+
defining the ``_format`` attribute explicitly on the request::
724+
725+
$request->attributes->set('_format', 'json');
726+
719727
.. _http-kernel-resource-locator:
720728

721729
Locating Resources

0 commit comments

Comments
 (0)