Skip to content

Commit

Permalink
Minor reword
Browse files Browse the repository at this point in the history
  • Loading branch information
javiereguiluz committed Jan 18, 2024
1 parent 6bab099 commit d52bced
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions components/http_kernel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -709,12 +709,15 @@ look like this::
// ...
}

.. _http-kernel-resource-locator:
.. note::

Also, note that by default, if the ``_format`` attribute is not set in your request, the value will be ``html``.
So, if your sub request returns something else than ``html`` (like json for instance) you can set it by setting the ``_format`` attribute on the request::
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');
$request->attributes->set('_format', 'json');

.. _http-kernel-resource-locator:

Locating Resources
------------------
Expand Down

0 comments on commit d52bced

Please sign in to comment.