Skip to content

Commit

Permalink
Merge branch '5.4' into 6.3
Browse files Browse the repository at this point in the history
* 5.4:
  Add information to sub request
  • Loading branch information
javiereguiluz committed Jan 18, 2024
2 parents c461d93 + d52bced commit 485b520
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions components/http_kernel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,14 @@ look like this::
// ...
}

.. note::

The default value of the ``_format`` request attribute is ``html``. If your
sub request returns a different format (e.g. ``json``) you can set it by
defining the ``_format`` attribute explicitly on the request::

$request->attributes->set('_format', 'json');

.. _http-kernel-resource-locator:

Locating Resources
Expand Down

0 comments on commit 485b520

Please sign in to comment.